/* ==========================================================
   Magnolia — The Georgi Family design system
   Quiet, editorial, photo-first. Restraint over decoration.
   ========================================================== */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin-opsz-normal.woff2") format("woff2-variations");
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin-opsz-italic.woff2") format("woff2-variations");
  font-weight: 200 800; font-style: italic; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin-ext-opsz-normal.woff2") format("woff2-variations");
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin-ext-opsz-italic.woff2") format("woff2-variations");
  font-weight: 200 800; font-style: italic; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 400 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk-latin-wght-italic.woff2") format("woff2-variations");
  font-weight: 400 900; font-style: italic; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 400 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --font-serif: "Newsreader", "Iowan Old Style", "Apple Garamond", Georgia, serif;
  --font-sans: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --ground: #F4F5F2;
  --surface: #FFFFFF;
  --surface-2: #F8F9F7;
  --ink: #17201C;
  --ink-2: #2E3833;
  --muted: #5B6660;
  --faint: #7F8983;
  --hairline: #E3E6E1;
  --hairline-2: #D3D8D2;

  --leaf: #2D4A3E;
  --leaf-press: #243C32;
  --on-leaf: #FFFFFF;
  --leaf-tint: #E6EDE9;
  --cover: #1F3329;
  --on-cover: #EEF1EA;
  --on-cover-muted: #B6C3BB;

  --brass: #8C6A35;
  --bronze: #6E5226;
  --brass-tint: #F2ECE1;

  --love: #9B3846;
  --love-tint: #F7EAEC;
  --proud: #6E5226;
  --proud-tint: #F2ECE1;

  --shadow-lift: 0 1px 1px rgb(23 32 28 / .04), 0 6px 18px rgb(23 32 28 / .07);
  --shadow-float: 0 1px 2px rgb(23 32 28 / .06), 0 18px 48px rgb(23 32 28 / .16);

  --r-control: 10px;
  --r-card: 16px;
  --r-sheet: 24px;

  --gutter: 20px;
  --maxw: 600px;
  --tabbar-h: 62px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: 220ms;

  --person: var(--leaf);
}

/* ---------- Themes ----------
   Magnolia is :root above. data-theme picks one of five; "auto" follows the phone using data-day and data-night.
   Light themes come first so a night theme wins after dark. Signed-out pages have no data-theme and follow the phone. */
:root[data-theme="linen"], :root[data-theme="auto"][data-day="linen"] {
  color-scheme: light;
  --ground: #F5EFE6; --surface: #FFFCF7; --surface-2: #F8F2E9;
  --ink: #2B211C; --ink-2: #43362E; --muted: #6F6158; --faint: #94867B;
  --hairline: #EADFD2; --hairline-2: #DACDBD;
  --leaf: #7C2D2B; --leaf-press: #66231F; --on-leaf: #FFF8F0; --leaf-tint: #F3E3DE;
  --cover: #3B1F1B; --on-cover: #F8EEE4; --on-cover-muted: #D9C4B5;
  --brass: #A27434; --bronze: #7E5824; --brass-tint: #F3E7D3;
  --love: #A23B3B; --love-tint: #F7E6E3; --proud: #7E5824; --proud-tint: #F3E7D3;
  --shadow-lift: 0 1px 1px rgb(43 33 28 / .05), 0 6px 18px rgb(43 33 28 / .08);
  --shadow-float: 0 1px 2px rgb(43 33 28 / .07), 0 18px 48px rgb(43 33 28 / .18);
}
:root[data-theme="harbor"], :root[data-theme="auto"][data-day="harbor"] {
  color-scheme: light;
  --ground: #EDF1F5; --surface: #FFFFFF; --surface-2: #F3F6F9;
  --ink: #142131; --ink-2: #2A3A4D; --muted: #566577; --faint: #7B8898;
  --hairline: #DDE4EB; --hairline-2: #CBD5DF;
  --leaf: #1F3D63; --leaf-press: #172F4D; --on-leaf: #FFFFFF; --leaf-tint: #E1E9F2;
  --cover: #16273D; --on-cover: #EEF3F8; --on-cover-muted: #B2C0CF;
  --brass: #9A7B45; --bronze: #765C2E; --brass-tint: #F0EADF;
  --love: #B03A48; --love-tint: #F7E6E9; --proud: #765C2E; --proud-tint: #F0EADF;
  --shadow-lift: 0 1px 1px rgb(20 33 49 / .05), 0 6px 18px rgb(20 33 49 / .08);
  --shadow-float: 0 1px 2px rgb(20 33 49 / .07), 0 18px 48px rgb(20 33 49 / .18);
}
:root[data-theme="dark"], :root[data-theme="evergreen"] {
  color-scheme: dark;
  --ground: #0E1412;
  --surface: #161E1B;
  --surface-2: #1A2320;
  --ink: #ECEFEA;
  --ink-2: #D2D9D4;
  --muted: #9AA59F;
  --faint: #75807A;
  --hairline: #24302B;
  --hairline-2: #303D37;
  --leaf: #9CC2AE;
  --leaf-press: #B1D0BF;
  --on-leaf: #0E1412;
  --leaf-tint: #1C2924;
  --cover: #17261F;
  --on-cover: #ECEFEA;
  --on-cover-muted: #A3B2A9;
  --brass: #C9A66B;
  --bronze: #D7B983;
  --brass-tint: #2A251B;
  --love: #E591A0;
  --love-tint: #2E1D21;
  --proud: #D7B983;
  --proud-tint: #2A251B;
  --shadow-lift: 0 1px 1px rgb(0 0 0 / .3), 0 6px 18px rgb(0 0 0 / .3);
  --shadow-float: 0 1px 2px rgb(0 0 0 / .4), 0 18px 48px rgb(0 0 0 / .5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]), :root[data-theme="auto"]:not([data-night="hearth"]) {
  color-scheme: dark;
  --ground: #0E1412;
  --surface: #161E1B;
  --surface-2: #1A2320;
  --ink: #ECEFEA;
  --ink-2: #D2D9D4;
  --muted: #9AA59F;
  --faint: #75807A;
  --hairline: #24302B;
  --hairline-2: #303D37;
  --leaf: #9CC2AE;
  --leaf-press: #B1D0BF;
  --on-leaf: #0E1412;
  --leaf-tint: #1C2924;
  --cover: #17261F;
  --on-cover: #ECEFEA;
  --on-cover-muted: #A3B2A9;
  --brass: #C9A66B;
  --bronze: #D7B983;
  --brass-tint: #2A251B;
  --love: #E591A0;
  --love-tint: #2E1D21;
  --proud: #D7B983;
  --proud-tint: #2A251B;
  --shadow-lift: 0 1px 1px rgb(0 0 0 / .3), 0 6px 18px rgb(0 0 0 / .3);
  --shadow-float: 0 1px 2px rgb(0 0 0 / .4), 0 18px 48px rgb(0 0 0 / .5);
}
}
:root[data-theme="hearth"] {
  color-scheme: dark;
  --ground: #15100D; --surface: #1F1813; --surface-2: #261E18;
  --ink: #F3EBE2; --ink-2: #DCCFC2; --muted: #AE9E8E; --faint: #85776A;
  --hairline: #2E241D; --hairline-2: #3B2F26;
  --leaf: #E1A866; --leaf-press: #ECBB80; --on-leaf: #1A120C; --leaf-tint: #2E2217;
  --cover: #2A1D14; --on-cover: #F3EBE2; --on-cover-muted: #C4B09C;
  --brass: #D9B37A; --bronze: #E5C590; --brass-tint: #2E2519;
  --love: #EE9A8C; --love-tint: #33201C; --proud: #E5C590; --proud-tint: #2E2519;
  --shadow-lift: 0 1px 1px rgb(0 0 0 / .35), 0 6px 18px rgb(0 0 0 / .35);
  --shadow-float: 0 1px 2px rgb(0 0 0 / .45), 0 18px 48px rgb(0 0 0 / .55);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"][data-night="hearth"] {
  color-scheme: dark;
  --ground: #15100D; --surface: #1F1813; --surface-2: #261E18;
  --ink: #F3EBE2; --ink-2: #DCCFC2; --muted: #AE9E8E; --faint: #85776A;
  --hairline: #2E241D; --hairline-2: #3B2F26;
  --leaf: #E1A866; --leaf-press: #ECBB80; --on-leaf: #1A120C; --leaf-tint: #2E2217;
  --cover: #2A1D14; --on-cover: #F3EBE2; --on-cover-muted: #C4B09C;
  --brass: #D9B37A; --bronze: #E5C590; --brass-tint: #2E2519;
  --love: #EE9A8C; --love-tint: #33201C; --proud: #E5C590; --proud-tint: #2E2519;
  --shadow-lift: 0 1px 1px rgb(0 0 0 / .35), 0 6px 18px rgb(0 0 0 / .35);
  --shadow-float: 0 1px 2px rgb(0 0 0 / .45), 0 18px 48px rgb(0 0 0 / .55);
}
}

/* Text size preference */
html[data-text="large"] { font-size: 112.5%; }
html[data-text="larger"] { font-size: 125%; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
:root {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 64px);
  background: var(--ground);
}
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 40;
  background: var(--ground);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
:focus-visible {
  outline: 2px solid var(--leaf);
  outline-offset: 3px;
  border-radius: 6px;
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.num { font-variant-numeric: lining-nums proportional-nums; }

/* ---------- Page transitions ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: var(--dur); animation-timing-function: var(--ease); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- Layout ---------- */
.app {
  min-height: 100dvh;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 40px);
}
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.stack-xl > * + * { margin-top: 48px; }

/* Top bar: compact title fades in once the large title scrolls away */
.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 30;
  height: 52px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  padding: 0 max(12px, calc((100% - var(--maxw)) / 2 + 12px));
  background: color-mix(in oklab, var(--ground) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}
.topbar.is-condensed { border-bottom-color: var(--hairline); }
.topbar__title {
  justify-self: center;
  font-weight: 600;
  font-size: .9375rem;
  letter-spacing: .005em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.topbar.is-condensed .topbar__title { opacity: 1; transform: none; }
.topbar__side { display: flex; align-items: center; }
.topbar__side--end { justify-content: flex-end; }
.iconbtn {
  width: 44px; height: 44px;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  color: var(--ink);
  text-decoration: none;
  background: transparent; border: 0; cursor: pointer;
}
.iconbtn:active { background: var(--hairline); }

/* Monogram: G in a thin brass ring */
.monogram {
  --m: 34px;
  width: var(--m); height: var(--m);
  border-radius: 50%;
  display: inline-grid; place-items: center;
  box-shadow: inset 0 0 0 1px var(--brass);
  color: var(--brass);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 450;
  font-size: calc(var(--m) * .56);
  line-height: 1;
  padding-bottom: calc(var(--m) * .04);
  flex: none;
}

/* Masthead + large titles */
.masthead { padding: 8px 0 4px; }
.kicker {
  color: var(--muted);
  font-size: .9375rem;
}
.largetitle {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: 2.125rem;
  line-height: 1.08;
  letter-spacing: -.012em;
  margin-top: 4px;
  text-wrap: balance;
}
.subtitle { color: var(--muted); margin-top: 6px; font-size: .9375rem; }

/* Section heads */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 4px;
}
.section-title {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -.005em;
}
.section-link {
  color: var(--leaf);
  font-weight: 600;
  font-size: .9375rem;
  text-decoration: none;
  padding: 10px 0 10px 12px;
}
.section-note { color: var(--muted); font-size: .9375rem; margin-top: 2px; }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 35;
  padding: 6px max(8px, calc((100% - var(--maxw)) / 2)) calc(6px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in oklab, var(--surface) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(20px);
  backdrop-filter: saturate(1.6) blur(20px);
  border-top: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.tab {
  position: relative;
  min-height: 50px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--faint);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .01em;
  text-decoration: none;
  border-radius: 12px;
  transition: color var(--dur) var(--ease);
}
.tab svg { transition: transform 160ms var(--ease); }
.tab:active svg { transform: scale(.92); }
.tab[aria-current="page"] { color: var(--ink); font-weight: 600; }
.tab[aria-current="page"]::after {
  content: "";
  position: absolute;
  top: 2px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--brass);
}

/* ---------- Buttons ---------- */
.btn {
  appearance: none;
  border: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .005em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms var(--ease), background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  -webkit-user-select: none; user-select: none;
}
.btn:active { transform: scale(.985); }
.btn--primary { background: var(--leaf); color: var(--on-leaf); }
.btn--primary:active { background: var(--leaf-press); }
.btn--secondary { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hairline-2); }
.btn--quiet { background: transparent; color: var(--leaf); padding: 0 6px; min-height: 44px; }
.btn--block { width: 100%; }
.btn--small { min-height: 44px; padding: 0 16px; font-size: .9375rem; border-radius: 10px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* ---------- Avatars ---------- */
.avatar {
  --size: 40px;
  position: relative;
  width: var(--size); height: var(--size);
  flex: none;
  border-radius: 50%;
  background: var(--person);
  color: #FFFFFF;
  display: inline-grid; place-items: center;
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: calc(var(--size) * .44);
  line-height: 1;
  overflow: hidden;
  text-decoration: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--empty {
  background: transparent;
  color: var(--faint);
  box-shadow: inset 0 0 0 1.5px var(--hairline-2);
}
.avatar-stack { display: inline-flex; align-items: center; }
.avatar-stack .avatar { --size: 30px; box-shadow: 0 0 0 2px var(--ring, var(--surface)); }
.avatar-stack .avatar + .avatar { margin-left: -7px; }
.avatar-stack .avatar--empty { box-shadow: 0 0 0 2px var(--ring, var(--surface)), inset 0 0 0 1.5px var(--hairline-2); }

.person-name { color: color-mix(in oklab, var(--person) 88%, var(--ink)); font-weight: 600; text-decoration: none; }
:root[data-scheme="dark"] .person-name { color: color-mix(in oklab, var(--person) 45%, #FFFFFF); }
@media (prefers-color-scheme: dark) {
  :root:is([data-scheme="auto"], :not([data-scheme])) .person-name { color: color-mix(in oklab, var(--person) 45%, #FFFFFF); }
}

/* ---------- The weekly cover ---------- */
.cover {
  position: relative;
  margin-top: 20px;
  border-radius: 20px;
  background: var(--cover);
  color: var(--on-cover);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}
.cover__body { position: relative; padding: 22px; }
.cover::after {
  /* a single hairline frame, like a stationery border */
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 14px;
  border: 1px solid color-mix(in oklab, var(--brass) 40%, transparent);
  pointer-events: none;
}
.cover__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cover__week { color: var(--on-cover-muted); font-size: .875rem; }
.cover .monogram { --m: 32px; color: #D4B47C; box-shadow: inset 0 0 0 1px #B8955A; }
.cover__question {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-style: italic;
  font-weight: 400;
  font-size: 2rem;
  line-height: 1.12;
  letter-spacing: -.01em;
  margin: 34px 0 26px;
  text-wrap: balance;
}
.cover__meta { display: flex; align-items: center; gap: 12px; color: var(--on-cover-muted); font-size: .9375rem; }
.cover__meta .avatar-stack { --ring: var(--cover); }
.cover__actions { margin-top: 20px; position: relative; z-index: 1; }
.btn--cover { background: var(--on-cover); color: var(--cover); }
.btn--cover:active { background: #DCE2DA; }


/* Question block (check-in page) */
.question-block { padding: 8px 0 4px; }
.question {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-style: italic;
  font-weight: 400;
  font-size: 1.875rem;
  line-height: 1.14;
  letter-spacing: -.01em;
  margin-top: 10px;
  text-wrap: balance;
}
.meta-line { display: flex; align-items: center; gap: 12px; margin-top: 18px; color: var(--muted); font-size: .9375rem; }
.meta-line .avatar-stack { --ring: var(--ground); }

/* ---------- Answers ---------- */
.answers { margin-top: 8px; }
.answer {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0 14px;
  padding: 22px 0 20px;
  border-top: 1px solid var(--hairline);
}
.answer:first-child { border-top: 0; }
.answer__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-height: 40px; }
.answer__head .person-name { font-size: 1rem; text-decoration: none; }
.answer__when { color: var(--faint); font-size: .8125rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.answer__body {
  grid-column: 2;
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--ink);
  text-wrap: pretty;
  margin-top: -10px;
}
.answer__photo {
  grid-column: 2;
  margin-top: 14px;
  border-radius: var(--r-card);
  aspect-ratio: 4 / 3;
  background: var(--hairline);
  display: grid; place-items: center;
  color: var(--faint);
  font-size: .875rem;
}
.answer__foot { grid-column: 2; margin-top: 14px; }
.answer__via { grid-column: 2; display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: .8125rem; margin-top: 10px; }

/* Reactions */
.reactions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.react {
  appearance: none; border: 0; cursor: pointer;
  min-height: 44px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: var(--ink-2);
  font-size: .9375rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums lining-nums;
  transition: background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), color var(--dur) var(--ease);
}
.react svg { transition: transform 200ms var(--ease); }
.react.is-popping svg { transform: scale(1.22); }
.react--love[aria-pressed="true"] { background: var(--love-tint); color: var(--love); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--love) 28%, transparent); }
.react--love[aria-pressed="true"] svg path { fill: currentColor; }
.react--proud[aria-pressed="true"] { background: var(--proud-tint); color: var(--proud); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--proud) 30%, transparent); }
.react--note { color: var(--muted); }

/* Notes under an answer */
.notes { grid-column: 2; margin-top: 14px; display: grid; gap: 10px; }
.note {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: .9375rem; line-height: 1.45;
}
.note .avatar { --size: 24px; margin-top: 1px; }
.note p { color: var(--ink-2); }
.note .person-name { font-size: .9375rem; margin-right: 4px; }

/* ---------- Agenda (Coming up) ---------- */
.agenda { margin-top: 6px; }
.agenda-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--hairline);
}
.agenda-row:first-child { border-top: 0; }
.datetile { text-align: center; line-height: 1; }
.datetile__m { display: block; color: var(--bronze); font-size: .75rem; font-weight: 600; letter-spacing: .02em; }
.datetile__d { display: block; font-family: var(--font-serif); font-optical-sizing: auto; font-size: 1.75rem; font-weight: 500; margin-top: 4px; font-variant-numeric: lining-nums tabular-nums; }
.agenda-row__title { font-weight: 600; font-size: 1rem; line-height: 1.3; }
.agenda-row__sub { color: var(--muted); font-size: .875rem; margin-top: 2px; }
.agenda-row__when { color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.agenda-row--holiday .agenda-row__title { font-family: var(--font-serif); font-size: 1.1875rem; font-weight: 500; }
.agenda-row .avatar { --size: 32px; justify-self: center; }

/* ---------- Stationery card (gifts, exchange) ---------- */
.stationery {
  position: relative;
  background: var(--surface);
  border-radius: 18px;
  padding: 24px 22px 22px;
  box-shadow: inset 0 0 0 1px var(--hairline), var(--shadow-lift);
}
.stationery::after {
  content: "";
  position: absolute; inset: 7px;
  border-radius: 13px;
  border: 1px solid color-mix(in oklab, var(--brass) 28%, transparent);
  pointer-events: none;
}
.stationery__head { display: flex; align-items: center; gap: 14px; }
.stationery__title { font-family: var(--font-serif); font-optical-sizing: auto; font-size: 1.375rem; font-weight: 500; line-height: 1.2; }
.stationery__sub { color: var(--muted); font-size: .9375rem; margin-top: 2px; }
.stationery__body { margin-top: 18px; color: var(--ink-2); }
.stationery__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--hairline); }
.fact__label { color: var(--muted); font-size: .8125rem; }
.fact__value { font-weight: 600; margin-top: 2px; font-variant-numeric: lining-nums; }
.stationery__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; position: relative; z-index: 1; }

/* ---------- Lists (rows) ---------- */
.rows { margin-top: 6px; }
.row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px 0;
  border-top: 1px solid var(--hairline);
  text-decoration: none;
  color: inherit;
}
.row:first-child { border-top: 0; }
.row--plain { grid-template-columns: 1fr auto; }
.row__title { font-weight: 600; line-height: 1.3; }
.row__sub { color: var(--muted); font-size: .875rem; margin-top: 2px; }
.row__end { color: var(--faint); display: flex; align-items: center; gap: 6px; font-size: .875rem; font-variant-numeric: tabular-nums; }
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .75rem; font-weight: 600; letter-spacing: .01em;
  color: var(--bronze);
}
.tag--claimed { color: var(--leaf); }
.lock-note { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .875rem; margin-top: 4px; }

/* Grouped settings lists */
.group {
  margin-top: 10px;
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: inset 0 0 0 1px var(--hairline);
  overflow: hidden;
}
.group .row { padding: 12px 16px; min-height: 56px; border-top-color: var(--hairline); }
.group .row:first-child { border-top: 0; }
.group-label { color: var(--muted); font-size: .875rem; margin: 30px 4px 0; }
.group-note { color: var(--faint); font-size: .8125rem; margin: 8px 4px 0; line-height: 1.45; }

/* Segmented control */
.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 2px;
  padding: 3px;
  background: var(--ground);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.segmented button {
  appearance: none; border: 0; cursor: pointer;
  min-height: 40px;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: .9375rem;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(23 32 28 / .08), 0 0 0 1px var(--hairline); }
.setting { padding: 16px; display: grid; gap: 12px; }
.setting + .setting { border-top: 1px solid var(--hairline); }
.setting__label { font-weight: 600; font-size: .9375rem; }

/* Switch */
.switch {
  appearance: none; border: 0; cursor: pointer; flex: none;
  width: 51px; height: 31px; border-radius: 999px;
  background: var(--hairline-2);
  position: relative;
  transition: background-color var(--dur) var(--ease);
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 27px; height: 27px; border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgb(0 0 0 / .18);
  transition: transform var(--dur) var(--ease);
}
.switch[aria-checked="true"] { background: var(--leaf); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }

/* Color swatches */
.swatches { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; padding: 16px; }
.swatch {
  appearance: none; border: 0; cursor: pointer;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--sw);
  position: relative;
  transition: transform 160ms var(--ease);
}
.swatch:active { transform: scale(.92); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--sw); }
.swatch[aria-pressed="true"]::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 30%; height: 16%;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: translateY(-15%) rotate(-45deg);
}

/* Drag rows for Today layout */
.handle { color: var(--faint); cursor: grab; }

/* ---------- Family directory ---------- */
.people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px 16px;
  margin-top: 26px;
}
.portrait {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  text-decoration: none; color: inherit;
  padding: 4px 4px 0;
  border-radius: 16px;
}
.portrait .avatar { --size: 108px; box-shadow: 0 0 0 1px color-mix(in oklab, var(--person) 20%, transparent); transition: transform 200ms var(--ease); }
.portrait:active .avatar { transform: scale(.97); }
.portrait__name { font-family: var(--font-serif); font-optical-sizing: auto; font-weight: 500; font-size: 1.3125rem; margin-top: 14px; line-height: 1.2; }
.portrait__line { color: var(--muted); font-size: .875rem; margin-top: 4px; line-height: 1.35; max-width: 18ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.portrait__soon { color: var(--bronze); font-size: .8125rem; font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; }

/* ---------- Person card ---------- */
.card-head {
  margin: 0 calc(var(--gutter) * -1);
  padding: 18px var(--gutter) 28px;
  background: color-mix(in oklab, var(--person) 9%, var(--ground));
  border-bottom: 1px solid color-mix(in oklab, var(--person) 14%, var(--hairline));
}
.card-head .avatar { --size: 96px; }
.card-head__name { font-family: var(--font-serif); font-optical-sizing: auto; font-weight: 500; font-size: 2.375rem; line-height: 1.05; letter-spacing: -.012em; margin-top: 18px; }
.card-head__meta { color: var(--muted); margin-top: 6px; font-size: .9375rem; }
.now {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.4;
  margin-top: 16px;
  color: var(--ink);
  text-wrap: pretty;
}
.now--empty { color: var(--faint); font-size: 1.0625rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 36px;
  padding: 0 14px 0 11px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline);
  font-size: .9375rem;
  color: var(--ink-2);
}
.chip svg { color: color-mix(in oklab, var(--person) 70%, var(--muted)); flex: none; }
.reach { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.reach .btn { flex-direction: column; gap: 4px; min-height: 64px; padding: 8px; font-size: .8125rem; border-radius: 14px; }
.updated { color: var(--faint); font-size: .8125rem; margin-top: 18px; }

.kv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 0 16px; margin-top: 8px; }
.kv dt, .kv dd { margin: 0; padding: 12px 0; border-top: 1px solid var(--hairline); }
.kv dt { color: var(--muted); font-size: .9375rem; }
.kv dd { font-size: .9375rem; color: var(--ink); }
.kv dt:first-of-type, .kv dd:first-of-type { border-top: 0; }
.prose { font-family: var(--font-serif); font-optical-sizing: auto; font-size: 1.1875rem; line-height: 1.5; margin-top: 10px; text-wrap: pretty; }

/* ---------- Empty states ---------- */
.empty {
  padding: 22px 0 6px;
  color: var(--muted);
  font-size: .9375rem;
}
.empty p + * { margin-top: 12px; }
.more-soon { color: var(--faint); font-size: .9375rem; font-family: var(--font-serif); font-style: italic; margin-top: 8px; }

/* ---------- Sheet (dialog) ---------- */
dialog.sheet {
  border: 0;
  padding: 0;
  margin: auto auto 0;
  width: min(100%, var(--maxw));
  max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 24px);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  box-shadow: var(--shadow-float);
  overflow: auto;
}
dialog.sheet[open] { animation: sheet-in 280ms var(--ease); }
dialog.sheet::backdrop { background: rgb(14 20 18 / .38); animation: fade-in 220ms var(--ease); }
@keyframes sheet-in { from { transform: translateY(32px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } }
.sheet__inner { padding: 10px 22px calc(22px + env(safe-area-inset-bottom, 0px)); }
.sheet__grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--hairline-2); margin: 0 auto 14px; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet__title { font-weight: 600; font-size: 1rem; }
.sheet__question { font-family: var(--font-serif); font-optical-sizing: auto; font-style: italic; font-size: 1.375rem; line-height: 1.25; margin-top: 18px; text-wrap: balance; }
.composer {
  display: block;
  width: 100%;
  min-height: 168px;
  margin-top: 16px;
  padding: 16px;
  border: 0;
  border-radius: var(--r-card);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: var(--ink);
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-size: 1.1875rem;
  line-height: 1.5;
  resize: none;
  field-sizing: content;
}
.composer:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--leaf); }
.composer::placeholder { color: var(--faint); }
.composer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.saved { color: var(--faint); font-size: .8125rem; }

/* ---------- Design page ---------- */
.token-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.token { border-radius: 14px; box-shadow: inset 0 0 0 1px var(--hairline); overflow: hidden; background: var(--surface); }
.token__chip { height: 56px; background: var(--c); }
.token__name { padding: 10px 12px; font-size: .8125rem; }
.token__name span { display: block; color: var(--muted); font-variant-numeric: tabular-nums; }
.type-sample + .type-sample { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--hairline); }
.type-sample small { display: block; color: var(--muted); font-size: .75rem; margin-bottom: 4px; font-family: var(--font-sans); font-style: normal; }

/* ---------- Wider screens ---------- */
@media (min-width: 720px) {
  :root { --gutter: 28px; }
  .people { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .largetitle { font-size: 2.5rem; }
  .cover__question { font-size: 2.375rem; }
}

/* Chip icons lift a little on dark grounds */
:root[data-scheme="dark"] .chip svg { color: color-mix(in oklab, var(--person) 45%, #FFFFFF); }
@media (prefers-color-scheme: dark) {
  :root:is([data-scheme="auto"], :not([data-scheme])) .chip svg { color: color-mix(in oklab, var(--person) 45%, #FFFFFF); }
}

/* ==========================================================
   Build 2: motion, photos, editing, gifts, welcome, admin
   ========================================================== */

/* ---------- Your color as the accent ---------- */
html[data-accent="mine"] { --leaf: var(--mine); --leaf-press: color-mix(in oklab, var(--mine) 82%, #000); --leaf-tint: color-mix(in oklab, var(--mine) 12%, var(--surface)); }
:root[data-scheme="dark"][data-accent="mine"] { --leaf: color-mix(in oklab, var(--mine) 50%, #fff); --leaf-press: color-mix(in oklab, var(--mine) 40%, #fff); --on-leaf: #0E1412; }
@media (prefers-color-scheme: dark) {
  :root:is([data-scheme="auto"], :not([data-scheme]))[data-accent="mine"] { --leaf: color-mix(in oklab, var(--mine) 50%, #fff); --leaf-press: color-mix(in oklab, var(--mine) 40%, #fff); --on-leaf: #0E1412; }
}

/* ---------- The page recedes when a sheet rises ---------- */
.app {
  transform-origin: 50% 0;
  transition: transform 420ms var(--ease), border-radius 420ms var(--ease), filter 420ms var(--ease);
}
html.sheet-open { overflow: hidden; }
html.sheet-open .app {
  transform: scale(.94) translateY(calc(env(safe-area-inset-top, 0px) + 10px));
  border-radius: 18px;
  overflow: hidden;
  filter: brightness(.94) saturate(.92);
}
.tabbar { transition: transform 360ms var(--ease), opacity 360ms var(--ease); }
html.sheet-open .tabbar { transform: translateY(110%); opacity: 0; }

dialog.sheet { transition: transform 260ms var(--ease); touch-action: pan-y; }
dialog.sheet.is-closing { animation: sheet-out 230ms var(--ease) forwards; }
dialog.sheet.is-closing::backdrop { animation: fade-out 230ms var(--ease) forwards; }
@keyframes sheet-out { to { transform: translateY(40px); opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
.sheet__grabber { cursor: grab; touch-action: none; padding: 6px 0; margin-top: -6px; background-clip: content-box; height: 17px; box-sizing: border-box; }
.sheet__head { touch-action: none; }
.sheet--compact .sheet__inner { padding-top: 10px; }
.btn--strong { font-weight: 700; }

/* ---------- Toasts ---------- */
.toasts {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 14px);
  z-index: 60;
  display: grid; justify-items: center; gap: 8px;
  pointer-events: none;
  padding: 0 16px;
}
.toast {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 14px;
  max-width: min(92vw, 520px);
  padding: 12px 14px 12px 18px;
  border-radius: 14px;
  background: color-mix(in oklab, var(--ink) 92%, transparent);
  color: var(--ground);
  font-size: .9375rem; font-weight: 500; line-height: 1.35;
  box-shadow: 0 10px 30px rgb(0 0 0 / .18);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transform: translateY(14px) scale(.98);
  opacity: 0;
  transition: transform 260ms var(--ease), opacity 260ms var(--ease);
}
.toast.is-in { transform: none; opacity: 1; }
.toast--error { background: color-mix(in oklab, var(--love) 94%, #000); color: #fff; }
.toast__action {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  color: inherit; font-weight: 700; font-size: .9375rem; padding: 6px 4px; opacity: .9;
}

/* ---------- Press feel ---------- */
a.row, .portrait, .wish, .linkrow { -webkit-tap-highlight-color: transparent; }
a.row:active, .linkrow:active { background: color-mix(in oklab, var(--ink) 4%, transparent); }
.group a.row:active { background: color-mix(in oklab, var(--ink) 5%, var(--surface)); }

/* ---------- Topbar text action ---------- */
.topbar__action { color: var(--leaf); font-weight: 600; font-size: 1rem; text-decoration: none; padding: 10px 4px; white-space: nowrap; }

/* ---------- Photo avatars ---------- */
.avatar--photo { background-color: var(--person); background-size: cover; background-position: center; }
.avatar--photo img { opacity: 0; transition: opacity 320ms var(--ease); }
.avatar--photo img.is-loaded { opacity: 1; }
.avatar { -webkit-user-select: none; user-select: none; }

/* ---------- Cover with a family photo ---------- */
.cover__image {
  position: relative;
  aspect-ratio: 4 / 3;
  background-color: color-mix(in oklab, var(--cover) 70%, #000);
  background-size: cover; background-position: center;
}
.cover__image img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 500ms var(--ease); }
.cover__image img.is-loaded { opacity: 1; }
.cover--photo::after { inset: 8px; }
.cover--photo .cover__body { padding-top: 20px; }
.cover--photo .cover__question { margin-top: 18px; }
.cover__mine {
  margin: -6px 0 22px;
  padding: 14px 16px;
  border-radius: 12px;
  background: color-mix(in oklab, var(--on-cover) 9%, transparent);
}
.cover__mine-label { font-size: .8125rem; color: var(--on-cover-muted); }
.cover__mine-text { font-family: var(--font-serif); font-size: 1.0625rem; line-height: 1.45; margin-top: 4px; }
.cover__note { color: var(--on-cover-muted); margin-top: -10px; font-size: .9375rem; }
.cover__actions { display: flex; gap: 10px; }
.cover__actions .btn { flex: 1; padding: 0 12px; font-size: .9375rem; white-space: nowrap; }
.btn--cover-ghost { background: transparent; color: var(--on-cover); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--on-cover) 35%, transparent); }

/* ---------- Photos in answers ---------- */
.answer__q { grid-column: 2; font-family: var(--font-serif); font-style: italic; color: var(--muted); font-size: .9375rem; margin: -8px 0 12px; }
.answer__media { grid-column: 2; }
.photos { display: grid; gap: 6px; margin-top: 14px; border-radius: var(--r-card); overflow: hidden; }
.photos--1 { grid-template-columns: 1fr; }
.photos--2 { grid-template-columns: 1fr 1fr; }
.photos--3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.photos--3 .photo:first-child { grid-row: span 2; }
.photos--4 { grid-template-columns: 1fr 1fr; }
.photo {
  appearance: none; border: 0; padding: 0; cursor: zoom-in;
  display: block; width: 100%;
  aspect-ratio: 1;
  background-color: var(--hairline);
  background-size: cover; background-position: center;
  overflow: hidden;
}
.photos--1 .photo { aspect-ratio: 4 / 3; }
.photos--3 .photo:first-child { aspect-ratio: auto; height: 100%; }
.photo img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 400ms var(--ease), transform 600ms var(--ease); }
.photo img.is-loaded { opacity: 1; }
.photo:active img { transform: scale(.985); }

/* Lightbox */
dialog.lightbox {
  border: 0; padding: 0; margin: 0;
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  background: rgb(8 10 9 / .96);
  display: grid; place-items: center;
}
dialog.lightbox:not([open]) { display: none; }
dialog.lightbox::backdrop { background: transparent; }
dialog.lightbox[open] { animation: fade-in 220ms var(--ease); }
dialog.lightbox img { max-width: 100%; max-height: 100dvh; object-fit: contain; }
.lightbox__close { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 10px); right: 12px; color: #fff; background: rgb(255 255 255 / .08); z-index: 2; }

/* ---------- Reactions: a soft pulse, never confetti ---------- */
.react { position: relative; }
.react::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 0 0 0 color-mix(in oklab, currentColor 40%, transparent);
  opacity: 0; pointer-events: none;
}
.react.is-popping::after { animation: pulse 520ms var(--ease); }
@keyframes pulse { 0% { opacity: .9; box-shadow: 0 0 0 0 color-mix(in oklab, currentColor 35%, transparent); } 100% { opacity: 0; box-shadow: 0 0 0 10px color-mix(in oklab, currentColor 0%, transparent); } }
.react__n { display: inline-block; min-width: .6em; }
.react__n.is-rolling { animation: roll 260ms var(--ease); }
@keyframes roll { from { transform: translateY(40%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Notes ---------- */
.note { position: relative; }
.note__del { width: 32px; height: 32px; margin: -6px -8px 0 auto; color: var(--faint); flex: none; }
.note-form {
  grid-column: 2;
  display: flex; align-items: center; gap: 6px;
  margin-top: 12px;
  padding: 4px 4px 4px 14px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline-2);
}
.note-form[hidden] { display: none; }
.note-form:focus-within { box-shadow: inset 0 0 0 1.5px var(--leaf); }
.note-form__input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--ink); font: inherit; font-size: 1rem; padding: 10px 0; }
.note-form__send { color: var(--leaf); }

/* ---------- Composer uploads ---------- */
.uploads { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.uploads:empty { display: none; }
.upload {
  position: relative;
  width: 76px; height: 76px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--hairline) center / cover;
}
.upload img { width: 100%; height: 100%; object-fit: cover; }
.upload.is-uploading img { filter: saturate(.6) brightness(.85); }
.upload.is-uploading::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgb(255 255 255 / .35) 50%, transparent 70%);
  background-size: 220% 100%;
  animation: shimmer 1.1s linear infinite;
}
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.upload__remove {
  position: absolute; top: 4px; right: 4px;
  width: 24px; height: 24px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center;
  background: rgb(0 0 0 / .55); color: #fff;
}

/* ---------- Buttons, links, tags ---------- */
.btn--danger { background: var(--love); color: #fff; }
.btn--danger-text { color: var(--love); }
.linkbtn { appearance: none; border: 0; background: none; color: var(--leaf); font: inherit; font-weight: 600; cursor: pointer; padding: 10px 6px; }
.linkrow { appearance: none; border: 0; background: none; color: var(--leaf); font: inherit; font-weight: 600; text-align: left; padding: 0; cursor: pointer; }
.linkrow--danger { color: var(--love); }
.tag--muted { color: var(--faint); }
.tag--danger { color: var(--love); }
.badge { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--leaf-tint); color: var(--leaf); font-size: .75rem; font-weight: 600; vertical-align: 2px; }
.badge--soft { background: var(--brass-tint); color: var(--bronze); }
.row__icon { color: var(--muted); display: inline-grid; }
.row__title--serif { font-family: var(--font-serif); font-weight: 500; font-size: 1.0625rem; }
.row__title--soft { font-weight: 400; }
.issue-no { width: 40px; text-align: center; font-family: var(--font-serif); font-size: 1.5rem; color: var(--bronze); }
.section-headwrap { margin-bottom: 2px; }

/* ---------- Person card extras ---------- */
.card-head--cover { padding-top: 0; }
.card-head__cover {
  margin: 0 calc(var(--gutter) * -1) -48px;
  aspect-ratio: 16 / 8;
  background: color-mix(in oklab, var(--person) 30%, var(--ground)) center / cover;
  overflow: hidden;
}
.card-head__cover img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 500ms var(--ease); }
.card-head__cover img.is-loaded { opacity: 1; }
.card-head--cover .avatar { position: relative; box-shadow: 0 0 0 4px color-mix(in oklab, var(--person) 9%, var(--ground)); }
.address { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: .9375rem; color: var(--ink-2); }
.address a { color: inherit; text-underline-offset: 3px; }
.card-head__edit { margin-top: 16px; }

/* Inline add (private notes) */
.inline-add { display: flex; gap: 8px; margin-top: 12px; }
.inline-add__input {
  flex: 1; min-width: 0; height: 44px; padding: 0 14px;
  border: 0; border-radius: 12px; background: var(--surface); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--hairline-2); font: inherit; font-size: 1rem;
}
.inline-add__input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--leaf); }

/* ---------- Wishes ---------- */
.wishes { margin-top: 6px; }
.wish {
  display: grid;
  grid-template-columns: auto 56px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--hairline);
  background: var(--ground);
  position: relative;
}
.wish:first-child { border-top: 0; }
.wishes:not([data-reorder]) .wish { grid-template-columns: 56px 1fr auto; }
.wish.is-dragging { z-index: 5; box-shadow: var(--shadow-float); border-radius: 14px; background: var(--surface); transition: box-shadow 200ms; }
.handle { touch-action: none; display: inline-grid; place-items: center; width: 28px; height: 44px; cursor: grab; }
.wish__img {
  width: 56px; height: 56px; border-radius: 12px; overflow: hidden;
  display: grid; place-items: center;
  background: var(--surface) center / cover;
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: var(--faint);
}
.wish__img img { width: 100%; height: 100%; object-fit: cover; }
.wish__main { min-width: 0; }
.wish__title { font-weight: 600; line-height: 1.3; }
.wish__meta { color: var(--muted); font-size: .875rem; margin-top: 2px; }
.wish__main .tag { margin-top: 6px; }
.wish__end { display: flex; align-items: center; gap: 2px; }
.wish--mine .wish__title { color: var(--leaf); }
.claim { display: flex; align-items: center; gap: 2px; }
.chip--claimed { appearance: none; border: 0; cursor: pointer; color: var(--leaf); background: var(--leaf-tint); box-shadow: none; font-weight: 600; min-height: 36px; padding: 0 12px 0 10px; }
.chip--claimed[aria-pressed="true"] { background: var(--leaf); color: var(--on-leaf); }

/* ---------- Envelope: Secret Santa reveal ---------- */
dialog.sheet.sheet--reveal { background: var(--cover); color: var(--on-cover); }
.sheet--reveal .sheet__grabber { background-color: color-mix(in oklab, var(--on-cover) 30%, transparent); }
.envelope { position: relative; min-height: 440px; display: grid; place-items: center; padding: 8px 0 12px; }
.envelope__card {
  width: 100%;
  text-align: center;
  opacity: 0;
  transform: translateY(24px) scale(.98);
  transition: opacity 600ms var(--ease) 260ms, transform 700ms var(--ease) 260ms;
  display: grid; gap: 12px; justify-items: center;
}
.envelope__kicker { color: var(--on-cover-muted); font-size: .875rem; }
.envelope__title { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 1.75rem; }
.envelope__who { display: grid; justify-items: center; gap: 14px; margin: 10px 0 6px; }
.envelope__who .avatar { box-shadow: 0 0 0 1px #B8955A, 0 0 0 7px var(--cover), 0 0 0 8px rgb(184 149 90 / .5); }
.envelope__name { font-family: var(--font-serif); font-size: 2.75rem; font-weight: 500; line-height: 1; letter-spacing: -.01em; }
.envelope__note { color: var(--on-cover-muted); font-size: .9375rem; margin-bottom: 8px; }
.envelope__card .btn--primary { background: var(--on-cover); color: var(--cover); }
.envelope__seal {
  position: absolute; inset: 0;
  appearance: none; border: 0; background: none; cursor: pointer; color: inherit;
  display: grid; place-content: center; justify-items: center; gap: 22px;
  transition: opacity 420ms var(--ease), transform 600ms var(--ease);
}
.envelope__seal .monogram { color: #D4B47C; box-shadow: inset 0 0 0 1px #B8955A, 0 0 0 10px rgb(184 149 90 / .12), 0 0 0 22px rgb(184 149 90 / .06); }
.envelope__hint { color: var(--on-cover-muted); font-size: .9375rem; }
.envelope.is-open .envelope__seal { opacity: 0; transform: scale(1.35); pointer-events: none; }
.envelope.is-open .envelope__card { opacity: 1; transform: none; }

/* ---------- Grouped form fields (autosave) ---------- */
.field {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 10px 44px 10px 16px;
  border-top: 1px solid var(--hairline);
}
.group > .field:first-child, .group > .field-pair:first-child .field:first-child { border-top: 0; }
.field__label { font-size: .8125rem; color: var(--muted); }
.field__input {
  appearance: none; border: 0; outline: none; background: transparent;
  color: var(--ink); font: inherit; font-size: 1.0625rem; line-height: 1.4;
  padding: 2px 0; min-height: 30px; width: 100%;
}
.field__input::placeholder { color: var(--faint); }
textarea.field__input { resize: none; min-height: 56px; field-sizing: content; }
.field:focus-within { background: color-mix(in oklab, var(--leaf) 4%, var(--surface)); }
.field__tick {
  position: absolute; right: 16px; top: 50%; translate: 0 -50%;
  color: var(--leaf); opacity: 0; transform: scale(.6);
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}
.field.is-saved .field__tick { opacity: 1; transform: none; }
.field.is-saving .field__tick { opacity: .35; transform: scale(.85); }
.field__hint { font-size: .75rem; color: var(--faint); }
.field__select { cursor: pointer; }
.field-pair { display: grid; grid-template-columns: 1fr 1.3fr; border-top: 1px solid var(--hairline); }
.group > .field-pair:first-child { border-top: 0; }
.field-pair .field { border-top: 0; }
.field-pair .field + .field { border-left: 1px solid var(--hairline); }
.check { width: 22px; height: 22px; accent-color: var(--leaf); }
.pair-form { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--hairline); flex-wrap: wrap; color: var(--muted); }
.pair-form select { flex: 1; min-width: 110px; height: 44px; border-radius: 10px; border: 0; padding: 0 10px; background: var(--ground); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hairline-2); font: inherit; }
.group .setting:first-child { border-top: 0; }
.cover-pick { aspect-ratio: 16 / 9; background: var(--hairline) center / cover; display: grid; place-items: center; overflow: hidden; }
.cover-pick img { width: 100%; height: 100%; object-fit: cover; }
.cover-pick__empty { color: var(--muted); font-size: .9375rem; padding: 0 24px; text-align: center; }
.cover-pick.is-uploading, .editor-cover.is-uploading, .editor-avatar.is-uploading .avatar, .welcome__photo.is-uploading .avatar { animation: breathe 1.2s var(--ease) infinite alternate; }
@keyframes breathe { from { opacity: 1; } to { opacity: .55; } }

/* ---------- Card editor header ---------- */
.editor-head { position: relative; margin: 6px 0 4px; text-align: center; }
.editor-cover {
  position: relative;
  margin: 0 calc(var(--gutter) * -1);
  aspect-ratio: 16 / 7;
  background: color-mix(in oklab, var(--person) 16%, var(--ground)) center / cover;
  overflow: hidden;
}
.editor-cover img { width: 100%; height: 100%; object-fit: cover; }
.editor-cover__btn { position: absolute; right: 14px; top: 14px; }
.editor-avatar { position: relative; display: inline-block; margin-top: -52px; cursor: pointer; border-radius: 50%; box-shadow: 0 0 0 4px var(--ground); }
.editor-avatar__badge, .welcome__photo-badge {
  position: absolute; right: 2px; bottom: 2px;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); color: var(--ink);
  box-shadow: 0 2px 8px rgb(0 0 0 / .18), inset 0 0 0 1px var(--hairline);
}
.editor-hint { color: var(--faint); font-size: .8125rem; margin-top: 10px; }

/* ---------- You ---------- */
.you-head { display: flex; align-items: center; gap: 16px; padding-top: 12px; }
.you-head__links { display: flex; gap: 14px; }
.you-head__links .section-link { padding: 6px 0; }
.you-foot { text-align: center; color: var(--faint); font-size: .8125rem; margin: 30px 0 8px; line-height: 1.8; font-family: var(--font-serif); font-style: italic; }
.you-foot a { color: inherit; font-family: var(--font-sans); font-style: normal; }
.swatches--loose { padding: 0; gap: 12px; margin-top: 24px; }

/* ---------- Welcome ---------- */
.welcome {
  min-height: 100dvh;
  max-width: 520px; margin: 0 auto;
  display: grid; grid-template-rows: auto 1fr auto;
  padding: 12px var(--gutter) calc(20px + env(safe-area-inset-bottom, 0px));
}
.welcome__top { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.dots { display: flex; gap: 8px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hairline-2); transition: background 300ms var(--ease), width 300ms var(--ease); }
.dot.is-done { background: color-mix(in oklab, var(--person) 50%, var(--hairline-2)); }
.dot.is-on { width: 22px; border-radius: 4px; background: var(--person); }
.welcome__body { padding-top: 6vh; animation: rise 520ms var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.welcome__title { font-family: var(--font-serif); font-weight: 500; font-size: 2.5rem; line-height: 1.05; letter-spacing: -.015em; text-wrap: balance; }
.welcome__lead { color: var(--muted); font-size: 1.0625rem; margin: 14px 0 28px; max-width: 36ch; }
.welcome__photo { position: relative; display: block; width: max-content; margin: 18px auto 0; cursor: pointer; border-radius: 50%; }
.welcome__photo .avatar { font-size: 4.5rem; }
.welcome__hint { text-align: center; color: var(--faint); font-size: .9375rem; margin-top: 18px; }
.welcome__preview { display: grid; place-items: center; margin: 8px 0 4px; }
.welcome__preview .avatar { transition: background-color 400ms var(--ease); }
.welcome__foot { display: grid; gap: 4px; padding-top: 18px; }

/* ---------- Plain pages (sign in) ---------- */
.plain { min-height: 100dvh; display: grid; place-items: center; padding: 24px var(--gutter) calc(24px + env(safe-area-inset-bottom, 0px)); }
.plain__inner { width: 100%; max-width: 400px; display: grid; justify-items: center; text-align: center; gap: 14px; animation: rise 520ms var(--ease) both; }
.plain__family { font-family: var(--font-serif); color: var(--muted); font-size: 1.0625rem; margin-top: -2px; }
.plain__title { font-family: var(--font-serif); font-weight: 500; font-size: 2.125rem; line-height: 1.1; margin-top: 18px; letter-spacing: -.01em; }
.plain__lead { color: var(--muted); max-width: 34ch; }
.plain__form { display: grid; gap: 10px; width: 100%; margin-top: 8px; }
.plain__input {
  height: 54px; border: 0; border-radius: 14px; padding: 0 16px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 1.0625rem; text-align: center;
  box-shadow: inset 0 0 0 1px var(--hairline-2);
}
.plain__input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--leaf); }
.plain__fine { color: var(--faint); font-size: .8125rem; max-width: 32ch; margin-top: 6px; }
.plain__error { color: var(--love); font-weight: 500; }
.plain__who { margin-top: 10px; }
.plain .btn--block { width: 100%; }

/* ---------- The Georgi Weekly, as a magazine ---------- */
.issue-mast { text-align: center; padding: 18px 0 30px; border-bottom: 1px solid var(--hairline); }
.issue-mast__kicker { color: var(--bronze); font-size: .875rem; font-weight: 600; }
.issue-mast__title { font-size: 2.75rem; margin-top: 10px; }
.issue-mast__q { font-family: var(--font-serif); font-style: italic; font-size: 1.375rem; line-height: 1.3; margin: 18px auto 0; max-width: 28ch; color: var(--ink-2); text-wrap: balance; }
.issue-body { padding-top: 10px; }
.letter { padding: 32px 0; border-bottom: 1px solid var(--hairline); }
.letter__by { display: flex; align-items: center; gap: 10px; }
.letter__text { font-family: var(--font-serif); font-optical-sizing: auto; font-size: 1.3125rem; line-height: 1.55; margin-top: 14px; text-wrap: pretty; hanging-punctuation: first; }
.letter__notes { margin-top: 14px; display: grid; gap: 6px; color: var(--ink-2); font-size: .9375rem; }
.issue-updates { padding: 32px 0 8px; }
.issue-update { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--ink-2); }
.issue-nav { display: flex; justify-content: space-between; padding: 30px 0 8px; }

/* ---------- Admin ---------- */
.person-row { border-top: 1px solid var(--hairline); padding-bottom: 12px; }
.person-row:first-child { border-top: 0; }
.person-row .row { border-top: 0; }
.person-row__actions { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 58px; }
.person-row__actions form { display: contents; }
.qr { text-align: center; display: grid; gap: 12px; justify-items: center; }
.qr__title { font-family: var(--font-serif); font-weight: 500; font-size: 1.75rem; margin-top: 4px; touch-action: none; }
.qr__sub { color: var(--muted); max-width: 30ch; }
.qr__code { width: min(78vw, 320px); aspect-ratio: 1; background: #fff; border-radius: 18px; padding: 14px; box-shadow: var(--shadow-lift); margin: 8px 0 14px; }
.qr__code svg { width: 100%; height: 100%; display: block; }

/* Confirm */
.confirm__title { font-family: var(--font-serif); font-weight: 500; font-size: 1.5rem; text-align: center; }
.confirm__body { color: var(--muted); text-align: center; margin: 8px auto 20px; max-width: 34ch; }
.confirm__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- Scroll-linked large titles where supported ---------- */
@supports (animation-timeline: scroll()) {
  .masthead .largetitle { animation: title-fade linear both; animation-timeline: scroll(); animation-range: 0 120px; transform-origin: 0 100%; }
  @keyframes title-fade { to { opacity: .2; transform: scale(.96); } }
}
@media (prefers-reduced-motion: reduce) {
  html.sheet-open .app { transform: none; filter: none; }
}

/* Preview only: screens without the tab bar */
html.no-tabs .tabbar { display: none; }

/* ---------- Password fields ---------- */
.pw { position: relative; }
.pw__input { display: block; width: 100%; box-sizing: border-box; padding-left: 76px; padding-right: 76px; }
.pw__toggle, .field__reveal {
  position: absolute; right: 8px; top: 50%; translate: 0 -50%;
  appearance: none; border: 0; background: transparent; cursor: pointer;
  color: var(--leaf); font: inherit; font-weight: 600; font-size: .9375rem;
  padding: 10px 10px; border-radius: 10px;
}
.field__reveal { right: 12px; }
.field:has(.field__reveal) .field__tick { display: none; }
.field:has(.field__reveal) { padding-right: 84px; }
.plain__alt { justify-self: center; margin-top: 2px; font-size: .9375rem; }

/* ==========================================================
   Ship 2: chat, calendar, reminders, notifications
   ========================================================== */
[hidden] { display: none !important; }

/* Tab bar badge and the bell */
.tab__icon { position: relative; display: inline-flex; }
.tab__badge {
  position: absolute; top: -5px; left: 15px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--love); color: #fff; font: 700 11px/18px var(--font-sans);
  text-align: center; box-shadow: 0 0 0 2px var(--surface);
}
.topbar__side--end { gap: 2px; }
.bell { position: relative; color: var(--ink-2); }
.bell__dot {
  position: absolute; top: 5px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--love); color: #fff; font: 700 10px/16px var(--font-sans);
  text-align: center; box-shadow: 0 0 0 2px var(--ground);
}

/* A large title with an action beside it */
.titlerow { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.titlerow .largetitle { margin-bottom: 0; }
.titlerow .btn { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 4px; flex: none; }

/* Turn notifications on */
.pushcard {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px 12px;
  margin: 16px 0; padding: 14px 8px 14px 16px; border-radius: var(--r-card);
  background: var(--leaf-tint); color: var(--ink);
}
.pushcard__icon { color: var(--leaf); display: inline-flex; }
.pushcard__title { margin: 0; font-weight: 650; font-size: .9375rem; }
.pushcard__sub { margin: 2px 0 0; color: var(--muted); font-size: .8125rem; line-height: 1.35; }
.pushcard__x { width: 34px; height: 34px; color: var(--muted); }
@media (max-width: 400px) {
  .pushcard { grid-template-columns: auto 1fr auto; }
  .pushcard .btn { grid-column: 2; grid-row: 2; justify-self: start; }
  .pushcard__x { grid-column: 3; grid-row: 1; }
}
.pushpanel { padding: 16px; margin-top: 14px; }
.pushstate .row__title { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; }
.steps { margin: 10px 0; padding-left: 22px; line-height: 1.5; }
.steps li + li { margin-top: 6px; }

/* Chat list */
.rooms { padding: 0; overflow: hidden; margin-top: 14px; }
.room {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 16px; color: inherit; text-decoration: none; border-top: 1px solid var(--hairline);
}
.room:first-child { border-top: 0; }
.room:active { background: var(--surface-2); }
.room__top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.room__title { margin: 0; font-weight: 600; display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room__muted { color: var(--faint); display: inline-flex; }
.room__when { color: var(--faint); font-size: .8125rem; white-space: nowrap; }
.room__last { margin: 2px 0 0; color: var(--muted); font-size: .875rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.room--unread .room__title { font-weight: 750; }
.room--unread .room__last { color: var(--ink-2); }
.roomav { position: relative; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.roomav--group .avatar:first-child { position: absolute; top: 0; left: 0; }
.roomav--group .avatar:last-child:not(:first-child) { position: absolute; right: 0; bottom: 0; box-shadow: 0 0 0 2px var(--surface); }

/* Picking people */
.dmgrid, .pickpeople { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 4px; }
.dmpick, .pick {
  display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%;
  padding: 8px 4px; border: 0; border-radius: var(--r-control); background: none; color: var(--ink-2);
  font: 500 .8125rem var(--font-sans); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.dmpick:active, .pick:active { background: var(--surface-2); }
.dmpick span, .pick__name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick { position: relative; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick .avatar { transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); }
.pick input:checked + .avatar { box-shadow: 0 0 0 2px var(--ground), 0 0 0 4px var(--leaf); transform: scale(1.05); }
.pick input:focus-visible + .avatar { outline: 2px solid var(--leaf); outline-offset: 4px; }
.pick input:checked ~ .pick__name { color: var(--ink); font-weight: 650; }
.pickpeople .field__hint { grid-column: 1 / -1; margin: 6px 4px 0; }
.pickhead { display: flex; justify-content: space-between; align-items: baseline; margin: 20px 4px 8px; }

/* A chat room */
#room .page { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.chat { display: flex; flex-direction: column; min-height: 40vh; }
.chat__older { align-self: center; margin: 6px 0; }
.chat__list { display: flex; flex-direction: column; padding-top: 6px; }
.chat__day, .chat__empty { align-self: center; margin: 18px 0 6px; font-size: .75rem; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; color: var(--faint); }
.chat__empty { text-transform: none; letter-spacing: 0; font-size: .9375rem; font-weight: 500; margin-top: 30vh; }
.chat__typing { min-height: 1.3em; margin: 6px 0 0 40px; color: var(--muted); font-size: .8125rem; font-style: italic; }
.msg { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; }
.msg--grouped { margin-top: 2px; }
.msg--mine { justify-content: flex-end; }
.msg__av { flex: none; margin-top: 19px; }
.msg--grouped .msg__av, .msg--mine .msg__av { margin-top: 0; }
.msg__col { display: flex; flex-direction: column; align-items: flex-start; max-width: min(80%, 460px); min-width: 0; }
.msg--mine .msg__col { align-items: flex-end; }
.msg__name { margin: 0 0 3px 12px; font-size: .75rem; font-weight: 650; color: var(--muted); }
.msg__bubble {
  max-width: 100%; padding: 8px 13px; border-radius: 19px; background: var(--surface); color: var(--ink);
  box-shadow: 0 0 0 1px var(--hairline); overflow-wrap: anywhere; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.msg--mine .msg__bubble { background: var(--leaf); color: var(--on-leaf); box-shadow: none; }
:root[data-accent="mine"] .msg--mine .msg__bubble { background: var(--mine, var(--leaf)); color: #fff; }
.msg__bubble:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; }
.msg__text { margin: 0; white-space: pre-wrap; line-height: 1.4; font-size: 1rem; }
.msg__text a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.msg__text--gone { font-style: italic; opacity: .75; }
.msg__quote { display: flex; flex-direction: column; margin: 0 0 6px; padding: 3px 9px; border-left: 3px solid currentColor; border-radius: 4px; font-size: .8125rem; opacity: .8; min-width: 0; }
.msg__quote span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg__photos { display: grid; gap: 3px; margin: -4px -9px 4px; border-radius: 15px; overflow: hidden; min-width: 200px; }
.msg__photos--2, .msg__photos--3, .msg__photos--4 { grid-template-columns: 1fr 1fr; }
.msg__photos--3 img:first-child { grid-column: 1 / -1; }
.msg__photos img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--surface-2); cursor: zoom-in; }
.msg__photos--1 img { aspect-ratio: auto; max-height: 320px; }
.msg__photos:only-child { margin-bottom: -4px; }
.msg__reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: -5px; padding: 0 8px; position: relative; }
.msg__react {
  border: 0; padding: 1px 7px; border-radius: 12px; background: var(--surface); color: var(--ink-2);
  box-shadow: 0 0 0 1px var(--hairline-2); font: 500 .8125rem/1.5 var(--font-sans); cursor: pointer;
}
.msg__react.is-mine { box-shadow: 0 0 0 1.5px var(--leaf); }
.msg__time { display: none; margin: 3px 10px 0; font-size: .6875rem; color: var(--faint); }
.msg:last-child .msg__time { display: block; }
.msg__seen { margin: 2px 10px 0; font-size: .6875rem; color: var(--muted); }
.msg--deleted .msg__bubble { background: transparent; color: var(--muted); box-shadow: 0 0 0 1px var(--hairline); cursor: default; }

/* Composer */
.chatbar {
  position: fixed; left: 0; right: 0; bottom: var(--kb, 0px); z-index: 30;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(18px); backdrop-filter: saturate(1.4) blur(18px);
  border-top: 1px solid var(--hairline);
}
.chatbar > * { max-width: var(--maxw); margin-inline: auto; }
.chatbar__row { display: flex; align-items: flex-end; gap: 6px; }
.chatbar textarea {
  flex: 1; min-height: 40px; max-height: 150px; resize: none; padding: 9px 14px;
  border: 1px solid var(--hairline-2); border-radius: 20px; background: var(--surface); color: var(--ink);
  font: 400 1rem/1.35 var(--font-sans);
}
.chatbar textarea:focus { outline: none; border-color: var(--leaf); }
.chatbar__photo { flex: none; width: 40px; height: 40px; color: var(--muted); cursor: pointer; }
.chatbar__send {
  flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--leaf); color: var(--on-leaf); cursor: pointer; transition: transform var(--dur) var(--ease), opacity var(--dur);
}
.chatbar__send:disabled { opacity: .3; cursor: default; }
.chatbar__send:not(:disabled):active { transform: scale(.9); }
.chatbar__reply {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px;
  padding: 4px 4px 4px 12px; border-left: 3px solid var(--leaf); border-radius: 6px; background: var(--surface);
  font-size: .8125rem; color: var(--ink-2);
}
.chatbar__reply span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chatbar__reply .iconbtn { width: 32px; height: 32px; flex: none; }
.chatbar__photos { display: flex; gap: 8px; margin-bottom: 8px; overflow-x: auto; }
.chatbar__thumb { position: relative; flex: none; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.chatbar__thumb img { width: 100%; height: 100%; object-fit: cover; }
.chatbar__thumb.is-uploading img { opacity: .45; }
.chatbar__thumb button {
  position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border: 0; border-radius: 50%;
  background: rgb(0 0 0 / .6); color: #fff; font-size: 15px; line-height: 22px; cursor: pointer;
}

/* Tap a message */
.reactbar { display: flex; gap: 4px; margin: 6px 0 14px; padding: 6px; border-radius: 30px; background: var(--surface-2); }
.reactbar__btn { flex: 1; height: 50px; border: 0; border-radius: 25px; background: none; font-size: 27px; cursor: pointer; transition: transform 160ms var(--ease); }
.reactbar__btn:active { transform: scale(1.25); }
.reactbar__btn.is-mine { background: var(--leaf-tint); }
.msgact { width: 100%; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.msgact--danger, .msgact--danger .row__icon { color: var(--love); }

/* Calendar */
.segnav { margin: 14px 0 4px; }
.segnav a {
  display: grid; place-items: center; min-height: 40px; border-radius: 9px; color: var(--muted);
  font-weight: 600; font-size: .9375rem; text-decoration: none;
}
.segnav a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(23 32 28 / .08), 0 0 0 1px var(--hairline); }
.agenda-row--link { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.agenda-row--link:active { background: var(--surface-2); }
.calsub {
  display: flex; align-items: center; gap: 12px; width: 100%; margin: 22px 0 0; padding: 14px 16px;
  border: 0; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-lift);
  color: var(--ink); font: 500 .9375rem/1.3 var(--font-sans); text-align: left; cursor: pointer;
}
.calsub span { flex: 1; }
.calsub > svg:first-child { color: var(--leaf); }
.monthhead { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 6px; }
.monthhead__title { margin: 0; font: 500 1.375rem/1.2 var(--font-serif); }
.month {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; padding: 8px;
  border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-lift);
}
.month__dow { padding: 2px 0 6px; text-align: center; font-size: .6875rem; font-weight: 700; color: var(--faint); }
.month__day {
  display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 48px; padding: 5px 0 4px;
  border-radius: 10px; color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.month__day.is-out { color: var(--faint); opacity: .5; }
.month__day.is-weekend:not(.is-today) .month__num { color: var(--muted); }
.month__day.is-selected { background: var(--leaf-tint); }
.month__num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 550; font-variant-numeric: tabular-nums; }
.month__day.is-today .month__num { background: var(--leaf); color: var(--on-leaf); }
.month__dots { display: flex; gap: 3px; min-height: 5px; }
.mdot { width: 5px; height: 5px; border-radius: 50%; background: var(--leaf); }
.mdot--birthday { background: var(--person); }
.mdot--holiday { background: var(--brass); }
.reminder--done { opacity: .55; }
.reminder--done .row__title { text-decoration: line-through; }

/* An event */
.evtitle { margin-top: 2px; }
.evfacts { margin-top: 16px; }
.evnotes { margin: 16px 4px 0; }
.rsvp { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.rsvp form { display: grid; }
.guests { margin: 10px 4px 0; color: var(--muted); font-size: .875rem; }
.guests select {
  margin-left: 8px; padding: 6px 10px; border: 1px solid var(--hairline-2); border-radius: var(--r-control);
  background: var(--surface); color: var(--ink); font: inherit;
}
.itemacts { gap: 2px; }
.itemacts .iconbtn { width: 34px; height: 34px; }
.evactions { display: grid; gap: 10px; margin-top: 24px; }
.evactions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.surprise { margin-top: 18px; }
.surprise summary { padding: 10px 4px; color: var(--leaf); font-weight: 650; cursor: pointer; list-style: none; }
.surprise summary::-webkit-details-marker { display: none; }

/* Switches inside forms (a real checkbox, drawn like the other switches) */
.toggle-row { cursor: pointer; }
.toggle {
  appearance: none; -webkit-appearance: none; position: relative; flex: none; justify-self: end; margin: 0;
  width: 51px; height: 31px; border-radius: 16px; background: var(--hairline-2); cursor: pointer;
  transition: background var(--dur) var(--ease);
}
.toggle::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 4px rgb(0 0 0 / .2); transition: transform var(--dur) var(--ease);
}
.toggle:checked { background: var(--leaf); }
.toggle:checked::after { transform: translateX(20px); }
.toggle:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; }

/* For you */
.activity { color: inherit; text-decoration: none; }
.activity--new { background: color-mix(in srgb, var(--leaf-tint) 70%, transparent); }
.activity__body { color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Five tabs, agenda cards, the chat room's title, rows that are buttons */
.tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.group.agenda { padding: 0 16px; }
#room .topbar__title { opacity: 1; transform: none; }
.rowbtn { width: 100%; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }

/* ==========================================================
   Ship 3: settings, More, the library, new Today sections
   ========================================================== */
/* Settings applied to the whole app */
html[data-headings="sans"] { --font-serif: var(--font-sans); }
html[data-headings="sans"] .largetitle { letter-spacing: -.02em; font-weight: 700; }
:root[data-contrast="high"]:not(#_) {
  --muted: color-mix(in oklab, var(--ink) 82%, var(--ground)); --faint: color-mix(in oklab, var(--ink) 68%, var(--ground));
  --hairline: color-mix(in oklab, var(--ink) 22%, var(--ground)); --hairline-2: color-mix(in oklab, var(--ink) 34%, var(--ground));
}
html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after {
  animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important;
}
html[data-density="compact"] { --gutter: 16px; }
html[data-density="compact"] .row { padding-top: 10px; padding-bottom: 10px; }
html[data-density="compact"] .group-label { margin-top: 18px; }
html[data-density="compact"] .agenda-row { padding: 10px 0; }
html[data-density="compact"] .room { padding-top: 9px; padding-bottom: 9px; }
html[data-density="compact"] .stack-xl > * + * { margin-top: 26px; }
html[data-density="compact"] .largetitle { margin-bottom: 8px; }

/* Theme cards */
.themes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.themecard {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 8px 12px; border: 0; border-radius: var(--r-card);
  background: var(--surface); box-shadow: 0 0 0 1px var(--hairline); color: var(--ink); font: inherit; text-align: left; cursor: pointer;
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.themecard:active { transform: scale(.98); }
.themecard[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--leaf); }
.themecard__art {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; margin-bottom: 8px; border-radius: 10px; overflow: hidden;
  background: var(--tg); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .06);
}
.themecard__art i { position: absolute; display: block; }
.tc-cover { left: 8%; top: 12%; width: 84%; height: 38%; border-radius: 8px; background: var(--tc); }
.tc-line { left: 8%; top: 60%; width: 58%; height: 7%; border-radius: 4px; background: var(--ti); opacity: .85; }
.tc-line--short { top: 73%; width: 38%; background: var(--tm); opacity: .7; }
.tc-pill { right: 8%; top: 61%; width: 20%; height: 18%; border-radius: 999px; background: var(--tl); }
.tc-dot { left: 14%; top: 22%; width: 9%; aspect-ratio: 1; border-radius: 50%; box-shadow: 0 0 0 2px var(--tb); }
.themecard__art--auto { background: linear-gradient(135deg, #F4F5F2 0 50%, #0E1412 50% 100%); }
.themecard__art--auto i:first-child { left: 18%; top: 22%; width: 22%; aspect-ratio: 1; border-radius: 50%; background: #E9C46A; box-shadow: 0 0 0 6px rgb(233 196 106 / .25); }
.themecard__art--auto i:last-child { right: 18%; bottom: 20%; width: 18%; aspect-ratio: 1; border-radius: 50%; box-shadow: -5px -3px 0 0 #DDE3DF; }
.themecard__name { font-weight: 650; font-size: .9375rem; padding: 0 4px; }
.themecard__note { color: var(--muted); font-size: .75rem; line-height: 1.3; padding: 0 4px; }

/* More */
.searchbar {
  display: flex; align-items: center; gap: 10px; margin: 6px 0 4px; padding: 0 14px; height: 46px; border-radius: 14px;
  background: var(--surface); box-shadow: 0 0 0 1px var(--hairline); color: var(--muted);
}
.searchbar:focus-within { box-shadow: 0 0 0 1.5px var(--leaf); }
.searchbar input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--ink); font: inherit; font-size: 1rem; outline: none; }
.searchbar--page { margin-top: 0; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  min-height: 74px; padding: 14px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-lift);
  color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; transition: transform var(--dur) var(--ease);
}
.tile:active { transform: scale(.97); }
.tile__icon { grid-row: 1 / 3; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--leaf-tint); color: var(--leaf); }
.tile__title { font-weight: 650; font-size: .9375rem; line-height: 1.2; }
.tile__sub { color: var(--muted); font-size: .75rem; line-height: 1.3; margin-top: 2px; }

/* The library */
.lib-blurb { margin: 2px 4px 14px; color: var(--muted); font-size: .9375rem; line-height: 1.45; }
.libgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.libtile { display: flex; flex-direction: column; gap: 3px; color: var(--ink); text-decoration: none; }
.libtile__img {
  display: grid; place-items: center; aspect-ratio: 4 / 3; margin-bottom: 6px; border-radius: 14px; overflow: hidden;
  background: var(--leaf-tint); color: var(--leaf); box-shadow: var(--shadow-lift);
}
.libtile__img img { width: 100%; height: 100%; object-fit: cover; }
.libtile__title { font-weight: 650; line-height: 1.25; }
.libtile__sub { color: var(--muted); font-size: .8125rem; }
.libfeed { display: grid; gap: 10px; }
.librow { color: inherit; text-decoration: none; }
.librow--done .row__title { text-decoration: line-through; text-decoration-color: var(--faint); }
.quotecard, .kudos {
  display: block; padding: 16px 18px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-lift);
  color: var(--ink); text-decoration: none;
}
.quotecard__text { margin: 0; font: 500 1.25rem/1.35 var(--font-serif); font-style: italic; }
.quotecard__who { margin: 8px 0 0; color: var(--muted); font-size: .875rem; }
.kudos__who { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .8125rem; font-weight: 600; }
.kudos__who span { margin-left: 4px; }
.kudos__text { margin: 8px 0 0; font: 500 1.0625rem/1.4 var(--font-serif); }
.kudos__meta { margin: 6px 0 0; color: var(--faint); font-size: .75rem; }

/* One item */
.itemtitle { margin-top: 2px; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 2px 14px; color: var(--muted); font-size: .8125rem; }
.itemprose { margin: 6px 4px 0; }
.sealed { display: grid; justify-items: center; gap: 6px; margin: 18px 0; padding: 30px 20px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-lift); text-align: center; color: var(--leaf); }
.sealed__title { margin: 6px 0 0; color: var(--ink); font: 500 1.25rem var(--font-serif); }
.sealed__sub { margin: 0; color: var(--muted); font-size: .875rem; max-width: 30ch; }
.recipe__yield { display: flex; align-items: center; gap: 6px; margin: 0 4px 6px; color: var(--muted); font-size: .9375rem; }
.recipe__list { margin: 0; padding: 6px 16px 6px 34px; }
.recipe__list li { padding: 7px 0; border-top: 1px solid var(--hairline); }
.recipe__list li:first-child { border-top: 0; }
.recipe__steps { margin: 0; padding: 0 4px 0 26px; counter-reset: step; }
.recipe__steps li { margin: 0 0 12px; padding-left: 4px; line-height: 1.5; }
.recipe__steps li::marker { color: var(--brass); font-weight: 700; }
.bigquote { margin: 8px 0 14px; padding: 22px 22px 18px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-lift); }
.bigquote p { margin: 0; font: 500 1.625rem/1.3 var(--font-serif); font-style: italic; }
.bigquote--kudos p { font-style: normal; font-size: 1.375rem; }
.bigquote footer { margin-top: 12px; color: var(--muted); font-size: .9375rem; }
.cardfront {
  margin: 8px 0 14px; padding: 28px 22px; border-radius: 20px; text-align: center; color: var(--on-cover);
  background: radial-gradient(120% 90% at 20% 0%, color-mix(in oklab, var(--brass) 35%, var(--cover)), var(--cover));
  box-shadow: var(--shadow-float);
}
.cardfront__title { margin: 0; font: 500 2rem/1.15 var(--font-serif); }
.cardfront__note { margin: 12px auto 0; max-width: 34ch; font-size: 1rem; line-height: 1.5; color: var(--on-cover); }
.cardfront__meta { margin: 14px 0 0; font-size: .8125rem; color: var(--on-cover-muted); }
.photogrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; margin: 14px 0; border-radius: 14px; overflow: hidden; }
.photogrid img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--surface-2); cursor: zoom-in; }
.photogrid--one { grid-template-columns: 1fr; }
.photogrid--one img { aspect-ratio: auto; max-height: 420px; }
.itemacts { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 16px 0 6px; }
.itemacts__space { flex: 1; }
.heartbtn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 0; border-radius: 18px;
  background: var(--surface); box-shadow: 0 0 0 1px var(--hairline-2); color: var(--ink-2); font: 600 .875rem var(--font-sans); cursor: pointer;
}
.heartbtn.is-on { background: var(--love-tint); color: var(--love); box-shadow: 0 0 0 1px color-mix(in oklab, var(--love) 40%, transparent); }
.heartbtn.is-on svg { fill: currentColor; }
.heartwho { color: var(--muted); font-size: .8125rem; }
.addphotos { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; cursor: pointer; }
.comment { align-items: start; }
.comment__body { margin: 0; white-space: pre-wrap; line-height: 1.45; }
.signatures { display: grid; gap: 10px; }
.signature {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 14px 16px; border-radius: 14px;
  background: var(--surface); box-shadow: var(--shadow-lift);
}
.signature .comment__body { font: 500 1.0625rem/1.45 var(--font-serif); }
.commentbox { display: flex; align-items: flex-end; gap: 8px; margin-top: 10px; }
.commentbox textarea {
  flex: 1; min-height: 44px; resize: none; padding: 10px 14px; border: 0; border-radius: 14px; background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline-2); color: var(--ink); font: inherit;
}
.commentbox textarea:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--leaf); }

/* Polls */
.poll { display: grid; gap: 8px; margin: 12px 0 4px; }
.poll form { display: grid; }
.poll__opt {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; overflow: hidden; border: 0;
  border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--hairline-2); color: var(--ink); font: 500 .9375rem var(--font-sans);
  text-align: left; cursor: pointer;
}
div.poll__opt { cursor: default; }
.poll__opt.is-mine { box-shadow: 0 0 0 1.5px var(--leaf); }
.poll__bar { position: absolute; inset: 0 auto 0 0; background: var(--leaf-tint); transition: width 400ms var(--ease); }
.poll__label, .poll__n, .poll__mine { position: relative; }
.poll__label { flex: 1; }
.poll__n { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .875rem; }
.poll__mine { color: var(--leaf); display: inline-flex; }
.todaypoll { padding: 14px 16px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-lift); }
.todaypoll + .todaypoll { margin-top: 10px; }
.todaypoll__q { display: block; color: var(--ink); text-decoration: none; font: 500 1.125rem/1.3 var(--font-serif); }
.todaypoll .group-note { margin-bottom: 0; }

/* Lists */
.checklist { padding: 4px 0; }
.check { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 8px 12px 8px 14px; border-top: 1px solid var(--hairline); }
.check:first-child { border-top: 0; }
.check__box {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 8px; cursor: pointer;
  box-shadow: inset 0 0 0 1.5px var(--hairline-2); background: none; color: var(--on-leaf);
}
.check.is-done .check__box { background: var(--leaf); box-shadow: none; }
.check.is-done .check__text { color: var(--faint); text-decoration: line-through; }
.check__who { border: 0; background: none; padding: 0; color: var(--leaf); font: 600 .75rem var(--font-sans); cursor: pointer; }
.check__x { width: 30px; height: 30px; color: var(--faint); }

/* Adding photos in a form */
.photopick { margin-top: 14px; }
.photopick__strip { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 8px; }
.photopick__strip:empty { display: none; }
.photopick__strip img { flex: none; width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.photopick__strip img.is-uploading { opacity: .4; }
.photopick .btn { display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }

/* Today: new sections */
.pinned { display: grid; gap: 10px; }
.pinnote {
  display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 14px 16px; border-radius: var(--r-card); color: var(--ink); text-decoration: none;
  background: var(--brass-tint); box-shadow: inset 3px 0 0 var(--brass);
}
.pinnote__icon { color: var(--bronze); padding-top: 2px; }
.pinnote__title { margin: 0; font-weight: 700; line-height: 1.3; }
.pinnote__body { margin: 4px 0 0; color: var(--ink-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pinnote__meta { margin: 6px 0 0; color: var(--muted); font-size: .75rem; }
.bday { display: grid; gap: 10px; }
.bday__card {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r-card);
  background: linear-gradient(135deg, color-mix(in oklab, var(--person) 16%, var(--surface)), var(--surface)); box-shadow: var(--shadow-lift);
}
.bday__card--you { grid-template-columns: 1fr; justify-items: center; text-align: center; background: radial-gradient(120% 100% at 50% 0%, var(--brass-tint), var(--surface)); }
.bday__emoji { margin: 0; font-size: 2.5rem; line-height: 1; }
.bday__title { margin: 0; font: 500 1.25rem/1.25 var(--font-serif); }
.bday__sub { margin: 2px 0 0; color: var(--muted); font-size: .875rem; }
.bday__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.countdown {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--r-card); background: var(--surface);
  box-shadow: var(--shadow-lift); color: var(--ink); text-decoration: none;
}
.countdown__n { font: 500 3.25rem/1 var(--font-serif); color: var(--leaf); font-variant-numeric: lining-nums tabular-nums; min-width: 1.4ch; text-align: center; }
.countdown__text { display: flex; flex-direction: column; min-width: 0; }
.countdown__label { color: var(--muted); font-size: .8125rem; font-weight: 600; }
.countdown__what { font: 500 1.25rem/1.25 var(--font-serif); }
.countdown__when { color: var(--muted); font-size: .8125rem; margin-top: 2px; }
.streak { color: var(--bronze); font-size: .8125rem; font-weight: 650; }
.newlist { margin: 0; padding-left: 18px; line-height: 1.5; }
.newlist li + li { margin-top: 8px; }
.ptr {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 6px); z-index: 60; width: 30px; height: 30px; border-radius: 50%;
  transform: translate(-50%, -60px); background: var(--surface); box-shadow: var(--shadow-lift);
  border: 2.5px solid var(--hairline-2); border-top-color: var(--leaf); transition: transform 200ms var(--ease);
}
.ptr.is-ready { border-color: var(--leaf); }
.ptr.is-spinning { animation: ptr-spin 700ms linear infinite; }
@keyframes ptr-spin { to { transform: translate(-50%, 50px) rotate(360deg); } }

/* ==========================================================
   Ship 3b: logins, profile sections, wide screens
   ========================================================== */
/* Phones first: the sidebar's extras stay hidden */
.topbar__me { display: flex; align-items: center; gap: 2px; }
.tabbar__brand, .tabbar__foot, .tabbar--wide-only { display: none; }
.todaygrid { display: flex; flex-direction: column; gap: 48px; }
.tcol { display: contents; }
.tblock:empty { display: none; }
html[data-density="compact"] .todaygrid { gap: 26px; }
.chatsplit__empty, .chatsplit--room .chatsplit__list, .month__labels { display: none; }
.calsplit__hint { margin: 18px 4px; color: var(--muted); font-size: .875rem; }

/* Sign-in and logins */
.plain__help { margin-top: 16px; max-width: 34ch; color: var(--muted); font-size: .875rem; text-align: center; }
.plain__help summary { cursor: pointer; color: var(--leaf); font-weight: 600; list-style: none; }
.plain__help summary::-webkit-details-marker { display: none; }
.plain__help p { margin: 8px 0 0; line-height: 1.45; }
.plain__help[open] { max-width: none; width: 100%; }
.plain__form--reset { margin-top: 12px; }
/* a password field with its Show button inside it (Choose a new password) */
.pw--field { position: relative; display: block; }
.pw--field .field__input { padding-right: 64px; }
.pw--field .pw__toggle { top: 50%; transform: translateY(-50%); }
.setting--link { padding-top: 2px; }
.setting--link .linkbtn { font-size: .875rem; }
/* "Your new password is saved" (an iPhone after an emailed reset link) */
.donecard { display: grid; justify-items: center; gap: 14px; margin: 36px auto 0; max-width: 30rem; text-align: center; }
.donecard__icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--leaf); color: var(--on-leaf); }
.donecard .largetitle { margin: 0; }
.donecard__text { margin: 0; color: var(--ink-2); font-size: 1.0625rem; line-height: 1.5; }
.loginnudge {
  display: flex; align-items: center; gap: 12px; margin: 0 0 24px; padding: 14px 16px; border-radius: var(--r-card);
  background: var(--leaf-tint); color: var(--ink); text-decoration: none;
}
.loginnudge > svg:first-child { color: var(--leaf); flex: none; }
.loginnudge span { flex: 1; font-size: .9375rem; line-height: 1.4; }
.setupnote { display: flex; align-items: flex-start; gap: 12px; margin: 14px 0; padding: 14px 16px; border-radius: var(--r-card); background: var(--leaf-tint); color: var(--leaf); }
.setupnote p { margin: 0; color: var(--ink); line-height: 1.45; }

/* Profile sections fold away; owners can take them off */
.person__body { display: flex; flex-direction: column; margin-top: 28px; }
.psec-tools { display: flex; justify-content: flex-end; gap: 18px; margin-bottom: 4px; }
.psec-tools .linkbtn { font-size: .8125rem; }
.psec { border-top: 1px solid var(--hairline); }
.psec:first-of-type { border-top: 0; }
.psec__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 2px 14px;
  cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent;
}
.psec__head::-webkit-details-marker { display: none; }
.psec__head .section-title { margin: 0; }
.psec__chev { display: inline-flex; color: var(--faint); transition: transform var(--dur) var(--ease); }
.psec[open] > .psec__head .psec__chev { transform: rotate(90deg); }
.psec__body { padding: 0 0 24px; }
.psec__link { display: flex; justify-content: flex-end; margin: -4px 0 8px; }
.psec__remove { display: block; margin: 18px 0 0 auto; color: var(--muted); font-size: .8125rem; }
.psec .kudos, .psec .quotecard { box-shadow: 0 0 0 1px var(--hairline); }
.psec-removed { margin-top: 18px; padding-top: 6px; border-top: 1px solid var(--hairline); }
.psec-removed__list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip--add { border: 0; cursor: pointer; font: inherit; color: var(--leaf); }

/* ---------- Laptops and desktops: a sidebar and real columns ---------- */
@media (min-width: 960px) {
  :root { --side: 248px; --maxw: 760px; --gutter: 32px; }
  #today, #chat, #room, #calendar-page, #family, #more, #library, #search, [id^="p-"] { --maxw: 1120px; }

  .tabbar, .tabbar--wide-only {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px; grid-template-columns: none;
    top: 0; bottom: 0; left: 0; right: auto; width: var(--side); height: 100dvh; padding: 20px 14px 18px;
    border-top: 0; border-right: 1px solid var(--hairline); background: color-mix(in oklab, var(--surface) 70%, var(--ground));
    transform: none !important; opacity: 1 !important; overflow-y: auto;
  }
  .tabbar__brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 24px; color: var(--ink); text-decoration: none; font: 500 1.125rem/1.2 var(--font-serif); }
  .tab { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--muted); font-size: .9375rem; font-weight: 550; }
  .tab:hover { background: var(--surface-2); color: var(--ink); }
  .tab[aria-current="page"] { background: var(--leaf-tint); color: var(--leaf); font-weight: 650; }
  .tab[aria-current="page"]::after { display: none; }
  .tabbar__foot { display: flex; flex-direction: column; gap: 2px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--hairline); }
  .tab--me .avatar { flex: none; }
  .tab--me span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .app { padding-left: var(--side); padding-bottom: 56px; }
  .topbar__brand, .topbar__me { display: none; }
  .largetitle { font-size: 2.5rem; }
  .masthead .largetitle { font-size: 2.75rem; }

  dialog.sheet { margin: auto; width: min(560px, calc(100% - 64px)); max-height: min(88dvh, 920px); border-radius: 22px; }
  dialog.sheet[open] { animation: modal-in 220ms var(--ease); }
  .sheet__grabber { display: none; }
  html.sheet-open .app { transform: none; border-radius: 0; filter: none; overflow: visible; }
  @keyframes modal-in { from { transform: translateY(12px) scale(.985); opacity: 0; } }

  .todaygrid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 40px; align-items: start; }
  .tcol { display: flex; flex-direction: column; gap: 40px; min-width: 0; }

  .chatsplit { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 32px; align-items: start; }
  .chatsplit__empty {
    display: grid; place-items: center; align-content: center; gap: 12px; min-height: 62dvh; border: 1.5px dashed var(--hairline-2);
    border-radius: var(--r-card); color: var(--faint); text-align: center; position: sticky; top: 72px;
  }
  .chatsplit__empty p { margin: 0; }
  .chatsplit--room .chatsplit__list { display: block; position: sticky; top: 64px; max-height: calc(100dvh - 88px); overflow: auto; padding-top: 6px; }
  .chatsplit--room .chatsplit__main { min-width: 0; }
  .room.is-current { background: var(--leaf-tint); }
  #room .chatbar {
    left: calc(var(--side) + max(0px, (100% - var(--side) - var(--maxw)) / 2) + var(--gutter) + 372px);
    right: calc(max(0px, (100% - var(--side) - var(--maxw)) / 2) + var(--gutter));
    border: 1px solid var(--hairline); border-bottom: 0; border-radius: 18px 18px 0 0;
  }
  .chatbar > * { max-width: none; }

  .calsplit { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr); gap: 36px; align-items: start; }
  .calsplit__day { position: sticky; top: 72px; }
  .month__day { align-items: stretch; min-height: 94px; padding: 6px; }
  .month__num { align-self: flex-start; width: 28px; height: 28px; }
  .month__labels { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin-top: 2px; }
  .month__label {
    padding: 1px 6px; border-radius: 5px; background: var(--leaf-tint); color: var(--leaf); font-size: .6875rem; line-height: 1.35;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .month__label--birthday { background: color-mix(in oklab, var(--person) 16%, var(--surface)); color: var(--ink); }
  .month__label--holiday { background: var(--brass-tint); color: var(--bronze); }
  .month__more { padding-left: 6px; color: var(--muted); font-size: .6875rem; }
  .month__dots { display: none; }
  .narrow { max-width: 760px; }

  .person { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 48px; align-items: start; }
  .person .card-head { position: sticky; top: 72px; }
  .person__body { margin-top: 0; }

  .tiles { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
  .libgrid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
  .libfeed { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  .themes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dmgrid, .pickpeople { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
}
@media (min-width: 1360px) { :root { --side: 272px; } }
@media (hover: hover) {
  a.row:hover, .rowbtn:hover, .room:hover, .agenda-row--link:hover, .month__day:hover { background: var(--surface-2); }
  .tile:hover, .themecard:hover, .countdown:hover { box-shadow: var(--shadow-float); }
  .libtile__img img { transition: transform 400ms var(--ease); }
  .libtile:hover .libtile__img img { transform: scale(1.04); }
  .psec__head:hover .psec__chev { color: var(--ink); }
}

/* ==========================================================
   Ship 3c: the last 26
   ========================================================== */
/* Chat: pins, links, polls, voice notes, double-tap */
.chat__pinned {
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + 56px); z-index: 5; display: flex; align-items: center; gap: 8px; width: 100%;
  margin: 4px 0 6px; padding: 9px 14px; border: 0; border-radius: 12px; background: var(--brass-tint); color: var(--ink);
  font: 500 .875rem var(--font-sans); text-align: left; cursor: pointer; box-shadow: var(--shadow-lift);
}
.chat__pinned svg { color: var(--bronze); flex: none; }
.chat__pinned span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg--pinned .msg__bubble { box-shadow: 0 0 0 1.5px var(--brass); }
.msg--mine.msg--pinned .msg__bubble { box-shadow: 0 0 0 2px var(--brass); }
.msg.is-flash .msg__bubble { animation: flash 1.4s var(--ease); }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 4px var(--brass); } }
.msg__bubble.is-hearted { animation: hearted 600ms var(--ease); }
@keyframes hearted { 30% { transform: scale(1.06); } }
.msg__link {
  display: flex; flex-direction: column; gap: 2px; margin: 8px -4px 2px; padding: 8px 10px; border-radius: 12px;
  background: color-mix(in oklab, currentColor 8%, transparent); color: inherit; text-decoration: none;
}
.msg__link-site { font-size: .75rem; opacity: .75; text-transform: lowercase; }
.msg__link-title { font-size: .875rem; line-height: 1.3; }
.msg__poll { display: grid; gap: 6px; min-width: 220px; padding: 2px 0; color: var(--ink); }
.msg--mine .msg__poll { color: var(--on-leaf); }
.msg__poll .poll__opt { min-height: 40px; font-size: .875rem; }
.msg--mine .msg__poll .poll__opt { background: color-mix(in oklab, var(--on-leaf) 14%, transparent); color: var(--on-leaf); box-shadow: none; }
.msg--mine .msg__poll .poll__bar { background: color-mix(in oklab, var(--on-leaf) 22%, transparent); }
.msg__poll-q { margin: 2px 0 4px; font: 600 .9375rem/1.3 var(--font-sans); }
.msg__poll-n { margin: 2px 0 0; font-size: .75rem; opacity: .75; }
.msg__audio { display: block; width: min(260px, 62vw); height: 36px; margin: 2px 0; }
.chatbar__record { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding: 6px 6px 6px 14px; border-radius: 22px; background: var(--love-tint); color: var(--love); font-weight: 600; }
.chatbar__rec-label { flex: 1; color: var(--ink-2); font-weight: 500; }
.chatbar__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--love); animation: recdot 1s infinite; }
@keyframes recdot { 50% { opacity: .3; } }
.chatbar.is-recording .chatbar__row { opacity: .4; pointer-events: none; }
.pinrow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 30ch; }

/* Group gifts and the scoreboard */
.groupgift { margin: 12px 0; }
.groupgift__bar { height: 12px; border-radius: 6px; background: var(--surface-2); overflow: hidden; box-shadow: inset 0 0 0 1px var(--hairline); }
.groupgift__bar span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--leaf), color-mix(in oklab, var(--leaf) 60%, var(--brass))); transition: width 500ms var(--ease); }
.groupgift__sum { margin: 10px 2px 12px; color: var(--muted); }
.groupgift__sum b { color: var(--ink); font-size: 1.25rem; font-family: var(--font-serif); font-weight: 500; }
.groupgift__form { margin-top: 10px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-lift); }
.board { display: grid; gap: 8px; margin: 12px 0 16px; }
.board__row { display: grid; grid-template-columns: 28px auto 1fr auto; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-lift); }
.board__row.is-top { background: linear-gradient(135deg, var(--brass-tint), var(--surface)); box-shadow: 0 0 0 1.5px var(--brass); }
.board__rank { font: 500 1.375rem var(--font-serif); color: var(--bronze); text-align: center; }
.board__name { font-weight: 650; }
.board__wins { color: var(--muted); font-variant-numeric: tabular-nums; }
.gameform { margin-top: 6px; }

/* Family: links, ask me about, timeline, addresses, tree */
.famlinks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pilllink {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 17px; background: var(--surface);
  box-shadow: 0 0 0 1px var(--hairline-2); color: var(--ink-2); font-size: .875rem; font-weight: 600; text-decoration: none;
}
.pilllink svg { color: var(--leaf); }
.askme { margin: 10px auto 0; max-width: 34ch; color: var(--ink-2); font-size: .9375rem; line-height: 1.4; }
.askme b { display: block; color: var(--muted); font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; border-left: 2px solid var(--hairline-2); }
.timeline li a { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 8px 0 8px 14px; color: inherit; text-decoration: none; position: relative; }
.timeline li a::before { content: ""; position: absolute; left: -7px; top: 15px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 2px var(--leaf); }
.timeline__year { font: 500 1.125rem var(--font-serif); color: var(--bronze); }
.timeline__what { display: flex; flex-direction: column; }
.timeline__what span { color: var(--muted); font-size: .8125rem; }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.btnrow .btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.addr { white-space: pre-line; }
.tree { display: grid; gap: 16px; }
.treeunit { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 12px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-lift); }
.treeunit__parents { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.treeunit__amp { font: 500 1.5rem var(--font-serif); color: var(--brass); }
.treeunit__line { width: 2px; height: 22px; background: var(--hairline-2); }
.treeunit__kids { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px; padding-top: 10px; border-top: 2px solid var(--hairline-2); }
.treeloose { border-top: 0; justify-content: flex-start; }
.treeperson { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 84px; color: var(--ink); text-decoration: none; font-size: .8125rem; font-weight: 600; text-align: center; }
.treeperson span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Trivia, year in review, budget, Secret Santa questions */
.trivia { padding: 20px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-lift); }
.trivia__q { margin: 0; color: var(--muted); font-size: .875rem; font-weight: 600; }
.trivia__a { margin: 10px 0 18px; font: 500 1.5rem/1.35 var(--font-serif); font-style: italic; }
.trivia__options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.trivia__opt {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 14px; background: var(--surface-2);
  color: var(--ink); font: 600 .9375rem var(--font-sans); cursor: pointer; transition: transform 160ms var(--ease), box-shadow var(--dur);
}
.trivia__opt:active { transform: scale(.97); }
.trivia__opt.is-right { box-shadow: 0 0 0 2px var(--leaf); background: var(--leaf-tint); }
.trivia__opt.is-wrong { box-shadow: 0 0 0 2px var(--love); background: var(--love-tint); }
.trivia__result { min-height: 1.4em; margin: 16px 0 10px; font: 500 1.125rem var(--font-serif); }
.yearhead { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; text-align: center; }
.yeartitle { margin: 0; }
.ystats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0 8px; }
.ystat { display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-lift); }
.ystat__n { font: 500 2rem/1 var(--font-serif); color: var(--leaf); font-variant-numeric: lining-nums tabular-nums; }
.ystat__label { color: var(--muted); font-size: .8125rem; font-weight: 600; }
.budget__totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.budget__totals > div { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-lift); }
.budget__totals .ystat__n { font-size: 1.5rem; }
.budget__row { display: grid; grid-template-columns: auto 1fr 84px 84px; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--hairline); }
.budget__row:first-child { border-top: 0; }
.budget__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.budget__in {
  width: 100%; height: 38px; padding: 0 10px; border: 0; border-radius: 10px; background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--hairline-2); color: var(--ink); font: inherit; text-align: right;
}
.budget__in:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--leaf); }
.santaq .commentbox { margin-top: 8px; }
.tipslist li b { color: var(--leaf); }

@media (min-width: 960px) {
  #tree { --maxw: 1120px; }
  .tree { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  .ystats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .trivia__options { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media print {
  .tabbar, .topbar, .noprint, #toasts { display: none !important; }
  .app { padding: 0 !important; }
  body { background: #fff; }
  .group { box-shadow: none; }
}

/* ---------- Thanksgiving setup night ---------- */
/* Today: admins see how far setup has got */
.setupline { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 14px 16px; border-radius: var(--r-card);
  background: var(--leaf-tint); color: var(--ink); text-decoration: none; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--leaf) 25%, transparent); }
.setupline span { flex: 1; font-size: .9375rem; line-height: 1.4; }
.setupline svg { color: var(--leaf); flex: none; }
/* Admin > Setup */
.setup-print { margin-top: 18px; }
.setup-list { display: grid; gap: 12px; margin-top: 18px; }
.setup-row { padding: 14px 16px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-lift); }
.setup-row.is-done { opacity: .8; }
.setup-row__who { display: flex; align-items: center; gap: 12px; }
.setup-row__who > div { flex: 1; min-width: 0; }
.setup-row__name { font-weight: 650; }
.setup-row__user { color: var(--muted); font-size: .875rem; }
.setup-row__count { color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
.setup-row__checks { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.setup-row__checks li { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 7px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); font-size: .8125rem; box-shadow: inset 0 0 0 1px var(--hairline); }
.setup-row__checks li.is-on { background: var(--leaf-tint); color: var(--ink); box-shadow: none; }
.setup-row__checks li.is-on svg { color: var(--leaf); }
.setup-row__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.setup-row__actions form { display: contents; }
/* Show code: the whole screen, to scan across the table */
dialog.qrfull { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--surface); color: var(--ink); }
dialog.qrfull::backdrop { background: var(--surface); }
.qrfull__inner { position: relative; display: grid; justify-items: center; align-content: center; gap: 14px; min-height: 100%; padding: 24px; text-align: center; }
.qrfull__close { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 12px); right: 12px; }
.qrfull__title { font-family: var(--font-serif); font-weight: 500; font-size: 2rem; }
.qrfull__code { width: min(78vw, 62vh, 460px); aspect-ratio: 1; padding: 16px; border-radius: 18px; background: #FFFFFF; }
.qrfull__code svg { width: 100%; height: 100%; display: block; }
.qrfull__user { font-size: 1.375rem; font-weight: 650; }
.qrfull__sub { max-width: 34ch; color: var(--muted); }
/* The guided flow */
.setup__progress { flex: 1; height: 6px; margin: 0 16px; border-radius: 3px; background: var(--hairline-2); overflow: hidden; }
.setup__progress span { display: block; height: 100%; border-radius: 3px; background: var(--person); transition: width 400ms var(--ease); }
.setup__step { color: var(--muted); font-size: .875rem; }
.howto { display: none; }
html.is-ios .howto--ios, html.is-android .howto--android, html.is-desktop .howto--desktop { display: block; }
.howto__art { display: block; width: min(60vw, 220px); height: auto; margin: 4px auto 18px; }
.howto__steps { margin: 0; padding-left: 1.4em; display: grid; gap: 10px; font-size: 1.0625rem; line-height: 1.45; }
.howto__icon { display: inline-flex; vertical-align: -3px; color: var(--leaf); }
.notify-step--ios { display: none; color: var(--ink-2); font-size: 1.0625rem; line-height: 1.5; }
html.is-ios:not(.is-standalone) .notify-step--ready { display: none; }
html.is-ios:not(.is-standalone) .notify-step--ios { display: block; }
/* The printed cards: four to a US Letter page */
.cards-page { padding: 16px; }
.cards-page__bar { display: flex; align-items: center; gap: 12px; max-width: 8.5in; margin: 0 auto 16px; }
.cards-page__count { flex: 1; color: var(--muted); font-size: .9375rem; text-align: center; }
.cards-sheet { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 0; width: 7.8in; height: 10.3in;
  margin: 0 auto 24px; background: #FFFFFF; color: #17201C; box-shadow: var(--shadow-lift); }
.setup-card { display: grid; justify-items: center; align-content: start; gap: 6px; padding: .28in .3in; border: 1px dashed #B9C0BA;
  text-align: center; font-family: var(--font-sans); overflow: hidden; }
.setup-card__head { display: flex; align-items: center; gap: 8px; font-family: var(--font-serif); font-size: 15px; color: #5B6660; }
.setup-card__head .monogram { color: #8C6A35; box-shadow: inset 0 0 0 1px #B8955A; }
.setup-card__for { font-family: var(--font-serif); font-size: 24px; font-weight: 500; color: #17201C; }
.setup-card__qr { width: 1.9in; height: 1.9in; margin: 4px 0; }
.setup-card__qr svg { width: 100%; height: 100%; display: block; }
.setup-card__user { font-size: 15px; color: #17201C; }
.setup-card__steps { margin: 4px 0 0; padding-left: 1.2em; display: grid; gap: 4px; text-align: left; font-size: 12.5px; line-height: 1.35; color: #2E3833; }
.setup-card__fine { margin-top: auto; font-size: 10.5px; color: #5B6660; }
@media print {
  @page { size: letter portrait; margin: .35in; }
  html, body { background: #FFFFFF !important; }
  .cards-page { padding: 0; }
  .cards-page__bar { display: none; }
  .cards-sheet { margin: 0; box-shadow: none; break-after: page; page-break-after: always; }
  .cards-sheet:last-child { break-after: auto; page-break-after: auto; }
  .setup-card { break-inside: avoid; }
}
@media screen and (max-width: 8.6in) {
  .cards-sheet { zoom: .45; }
}

/* ---------- Simple mode: bigger text, four big buttons, four tabs ---------- */
html[data-simple] { font-size: 125%; }
html[data-simple][data-text="larger"] { font-size: 137.5%; }
.simplegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.bigbtn { display: grid; justify-items: center; align-content: center; gap: 10px; min-height: 8.5rem; padding: 16px 10px; border: 0;
  border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-lift); color: var(--ink); font: 650 1.0625rem/1.25 var(--font-sans);
  text-align: center; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bigbtn svg { color: var(--leaf); }
.bigbtn:active { transform: scale(.98); }
.simplestack { display: grid; gap: 24px; margin-top: 4px; }
.callrow__go { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--leaf-tint); color: var(--leaf); }
/* a voice answer in the answer sheet, and wherever answers show */
.voice { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
/* the clock and Recording… on one line, Cancel and Done beside them or, when the text is bigger, on the next line at the right */
.voice__rec { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; flex: 1 1 100%; min-width: 0; padding: 8px 12px; border-radius: 14px; background: var(--surface-2); }
.voice__label { flex: 1 1 auto; color: var(--muted); }
.voice__rec [data-voice-cancel] { margin-left: auto; }
.voice__clip { display: flex; align-items: center; gap: 8px; flex: 1 1 100%; min-width: 0; }
.composer-bar .btn { white-space: nowrap; }
.voice__clip audio { flex: 1; min-width: 0; height: 40px; }
.voice.is-uploading { opacity: .6; }
.answer__audio { grid-column: 2; display: block; width: 100%; max-width: 420px; height: 40px; margin-top: 10px; }   /* beside the avatar, like the words */

/* ---------- Photos that arrive on their own: the picker sheet and the upload queue ---------- */
.photosheet__title { text-align: left; margin: 6px 0 8px; }
.photosheet__sub { margin: 0 0 18px; color: var(--muted); line-height: 1.45; }
.photosheet__pick { min-height: 56px; font-size: 1.0625rem; }
.upq { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 12px; width: min(92vw, 420px); }
.upq__text { margin: 0; grid-column: 1; }
.upq__count { opacity: .85; font-weight: 450; }
.upq__bar { grid-column: 1 / -1; width: 100%; height: 6px; border: 0; border-radius: 3px; overflow: hidden; -webkit-appearance: none; appearance: none;
  background: color-mix(in oklab, var(--ground) 22%, transparent); }
.upq__bar::-webkit-progress-bar { background: transparent; }
.upq__bar::-webkit-progress-value { background: var(--ground); border-radius: 3px; transition: width 300ms var(--ease); }
.upq__bar::-moz-progress-bar { background: var(--ground); border-radius: 3px; }
.upq--done .upq__bar { display: none; }
.upq__retry { grid-column: 2; grid-row: 1; }


/* ==========================================================
   Search: the panel (public/search.js), its results, the full page (/search)
   ========================================================== */
.topbar__search { display: inline-grid; }
.tab__kbd { display: none; }
@media (min-width: 960px) {
  .topbar__search { display: none; }
  .tab--search .tab__kbd {
    display: inline-block; margin-left: auto; padding: 2px 6px; border-radius: 6px; font: 600 .6875rem/1.4 var(--font-sans);
    color: var(--faint); box-shadow: inset 0 0 0 1px var(--hairline-2); letter-spacing: .02em;
  }
}
kbd { font-family: var(--font-sans); }

dialog.spanel {
  border: 0; padding: 0; margin: 0; width: 100%; max-width: none; height: 100dvh; max-height: none;
  background: var(--ground); color: var(--ink);
}
dialog.spanel::backdrop { background: rgb(10 14 12 / .42); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
dialog.spanel[open] { animation: spanel-in 200ms var(--ease); }
dialog.spanel[open]::backdrop { animation: fade-in 200ms var(--ease); }
dialog.spanel.is-closing { animation: spanel-out 160ms var(--ease) forwards; }
@keyframes spanel-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes spanel-out { to { opacity: 0; transform: translateY(6px); } }
html.spanel-open { overflow: hidden; }
.spanel__box { display: flex; flex-direction: column; height: 100%; padding-top: env(safe-area-inset-top, 0px); }
.spanel__bar {
  display: flex; align-items: center; gap: 4px; padding: 10px 10px 10px 16px; flex: none;
  border-bottom: 1px solid var(--hairline); background: var(--surface);
}
.spanel__glass { color: var(--muted); display: inline-grid; }
.spanel__input {
  flex: 1; min-width: 0; height: 44px; border: 0; outline: none; background: none; color: var(--ink);
  font: 500 1.125rem/1.2 var(--font-sans); padding: 0 6px;
}
.spanel__input::placeholder { color: var(--faint); font-weight: 400; }
.spanel__mic.is-listening { color: var(--love); animation: mic-pulse 1.2s var(--ease) infinite; }
@keyframes mic-pulse { 50% { transform: scale(1.12); } }
.spanel__cancel { flex: none; }
.spanel__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px 0; flex: none; }
.spanel__chips[hidden] { display: none; }
.spanel__main { flex: 1; min-height: 0; display: flex; }
.spanel__list { flex: 1; min-width: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px calc(16px + env(safe-area-inset-bottom, 0px)); scroll-padding: 40px 0 12px; }
.spanel.is-busy .spanel__glass { animation: glass-busy 900ms var(--ease) infinite; }
@keyframes glass-busy { 50% { opacity: .35; } }
.spanel__preview { display: none; }
.spanel__foot { display: none; }
.spanel__group { padding: 2px 0 6px; }
.spanel__ghead {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0; padding: 14px 10px 6px;
  color: var(--muted); font-size: .8125rem; font-weight: 650; letter-spacing: .02em;
}
.spanel__ghead .linkbtn, .spanel__more { padding: 0; font-size: .8125rem; color: var(--leaf); text-decoration: none; font-weight: 600; }
.spanel__note, .spanel__tip { margin: 22px 12px; color: var(--muted); font-size: .9375rem; line-height: 1.5; }
.spanel__tip .linkbtn { padding: 0 2px; }
.spanel__dym { margin: 12px 10px 2px; color: var(--muted); font-size: .9375rem; }
.spanel__dym .linkbtn { padding: 0; }
.spanel__qchips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px 6px; }
.spanel__recent .spanel__ghead { padding-top: 12px; }

/* one result: in the panel, and on /search */
.sr {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  width: 100%; min-height: 56px; padding: 8px 10px; border-radius: 12px; border: 0; background: none;
  color: var(--ink); text-decoration: none; text-align: left; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.sr[aria-selected="true"] { background: var(--leaf-tint); box-shadow: inset 3px 0 0 var(--leaf); }
.sr__lead { display: inline-grid; place-items: center; width: 40px; }
.sr__icon {
  width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center;
  background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--hairline);
}
.sr__icon--action { background: var(--leaf-tint); color: var(--leaf); box-shadow: none; }
.sr__thumb { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.sr__text { display: flex; flex-direction: column; min-width: 0; }
.sr__title { font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sr__sub { color: var(--muted); font-size: .8125rem; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr__snip { color: var(--ink-2, var(--muted)); font-size: .875rem; line-height: 1.4; margin-top: 3px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sr__kind { color: var(--faint); font-size: .75rem; font-weight: 600; white-space: nowrap; }
.sr mark, .spanel__pv mark { background: color-mix(in oklab, var(--brass) 26%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.sr--top { min-height: 68px; }
.sr--top .sr__lead { width: 52px; }
.sr--top .sr__icon { width: 48px; height: 48px; border-radius: 14px; }
.sr--top .sr__thumb { width: 52px; height: 52px; border-radius: 12px; }
.sr--top .sr__title { font-family: var(--font-serif); font-weight: 500; font-size: 1.1875rem; }
@media (hover: hover) { .sr:hover { background: var(--surface-2); } .sr[aria-selected="true"]:hover { background: var(--leaf-tint); } }

.schip {
  display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 0;
  background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hairline-2); font: 600 .8125rem/1 var(--font-sans);
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.schip.is-on { background: var(--leaf); color: var(--on-leaf); box-shadow: none; }
.schip svg { flex: none; }
.schips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 2px 2px; scrollbar-width: none; }
.schips::-webkit-scrollbar { display: none; }
.sdym { margin: 18px 4px 0; color: var(--muted); }
.sgroup .group { padding: 4px 6px; }
.sgroup .sr { border-top: 1px solid var(--hairline); border-radius: 0; }
.sgroup .sr:first-child { border-top: 0; }

@media (min-width: 960px) {
  dialog.spanel {
    margin: 10vh auto auto; width: min(900px, calc(100% - 64px)); height: min(640px, 78vh); border-radius: 20px;
    background: var(--surface); box-shadow: var(--shadow-float), 0 0 0 1px var(--hairline);
  }
  .spanel__box { padding-top: 0; }
  .spanel__bar { border-radius: 20px 20px 0 0; padding: 12px 14px 12px 20px; }
  .spanel__cancel { display: none; }
  .spanel__list { flex: 0 0 56%; border-right: 1px solid var(--hairline); padding-bottom: 12px; }
  .spanel__preview { display: block; flex: 1; min-width: 0; overflow-y: auto; padding: 24px 26px; background: var(--surface-2); }
  .spanel__pv-img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 14px; margin-bottom: 14px; background: var(--hairline); }
  .spanel__pv-av { margin-bottom: 12px; }
  .spanel__pv-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--surface); color: var(--leaf); box-shadow: inset 0 0 0 1px var(--hairline); margin-bottom: 14px; }
  .spanel__pv-kind { margin: 0; color: var(--faint); font-size: .75rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
  .spanel__pv-title { margin: 4px 0 0; font: 500 1.5rem/1.2 var(--font-serif); text-wrap: balance; }
  .spanel__pv-sub { margin: 6px 0 0; color: var(--muted); font-size: .9375rem; }
  .spanel__pv-text { margin: 14px 0 0; font: 400 1.0625rem/1.55 var(--font-serif); color: var(--ink-2, var(--ink)); }
  .spanel__pv-go { margin: 18px 0 0; display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: .8125rem; }
  .spanel__pv-empty { height: 100%; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--faint); text-align: center; font-size: .9375rem; }
  .spanel__pv-empty p { margin: 0; max-width: 220px; }
  .spanel__foot {
    display: flex; align-items: center; gap: 16px; margin: 0; padding: 10px 18px; border-top: 1px solid var(--hairline);
    color: var(--faint); font-size: .75rem; border-radius: 0 0 20px 20px; background: var(--surface);
  }
  .spanel__foot span { display: inline-flex; align-items: center; gap: 3px; }
  .spanel__foot kbd { min-width: 20px; padding: 1px 5px; border-radius: 5px; box-shadow: inset 0 0 0 1px var(--hairline-2); font-size: .6875rem; text-align: center; color: var(--muted); }
  .spanel__all { margin-left: auto; color: var(--leaf); font-weight: 600; text-decoration: none; }
}

/* ==========================================================
   Today: Needs you and the photo frame
   ========================================================== */
.needs, .frame { padding: 18px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-lift); }
.needs__head, .frame__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.needs__title, .frame__title { margin: 0; font: 500 1.25rem/1.2 var(--font-serif); }
.needs__list { list-style: none; margin: 10px -8px 0; padding: 0; }
.needs__list li + li .need { border-top: 1px solid var(--hairline); border-radius: 0; }
.need {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 58px;
  padding: 9px 8px; border: 0; background: none; color: var(--ink); text-decoration: none; text-align: left; font: inherit; cursor: pointer;
  color: var(--ink); -webkit-tap-highlight-color: transparent;
}
.need > svg { color: var(--faint); }
.need__icon { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--leaf-tint); color: var(--leaf); }
.need__text { display: flex; flex-direction: column; min-width: 0; }
.need__title { font-weight: 600; line-height: 1.3; }
.need__sub { color: var(--muted); font-size: .8125rem; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.needs__calm { display: flex; align-items: center; gap: 10px; margin: 12px 0 2px; color: var(--muted); }
.needs__check { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--leaf-tint); color: var(--leaf); }
@media (hover: hover) { .need:hover { background: var(--surface-2); border-radius: 10px; } }

.frame__shuffle { margin: -10px -10px -10px 0; color: var(--muted); }
.frame__shuffle.is-spinning svg { animation: spin-once 500ms var(--ease); }
@keyframes spin-once { to { transform: rotate(180deg); } }
.frame__photo {
  position: relative; display: block; margin-top: 12px; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden;
  background: var(--surface-2) center / cover no-repeat;
}
.frame__photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity 360ms var(--ease); }
.frame__photo img:not(.is-loaded) { opacity: 0; }
.frame__badge {
  position: absolute; left: 10px; bottom: 10px; padding: 5px 10px; border-radius: 999px; font-size: .75rem; font-weight: 650;
  color: #fff; background: rgb(0 0 0 / .45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.frame__meta { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; color: var(--muted); font-size: .8125rem; line-height: 1.35; min-height: 24px; }
.frame__empty { margin: 10px 0 0; color: var(--muted); font-size: .9375rem; line-height: 1.5; }

/* ==========================================================
   The family map (/map, public/map/map.js)
   ========================================================== */
.skiplink {
  position: absolute; left: 12px; top: 12px; z-index: 60; padding: 10px 14px; border-radius: 10px; background: var(--leaf); color: var(--on-leaf);
  font-weight: 650; text-decoration: none; transform: translateY(-160%); transition: transform 160ms var(--ease);
}
.skiplink:focus { transform: none; }
.mapapp { position: fixed; inset: 0; overflow: hidden; background: #15191b; --glass: color-mix(in oklab, var(--surface) 80%, transparent); --peek: 148px; }
.mapapp .mapview, .mapapp .mapview.maplibregl-map { position: absolute; inset: 0; width: 100%; height: 100%; }
.mapview__note { position: absolute; top: 40%; left: 0; right: 0; text-align: center; color: #c8d0d4; }
.mapview .maplibregl-canvas:focus-visible { outline: 3px solid var(--leaf); outline-offset: -3px; }
.mapbtn {
  width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; border-radius: 14px; cursor: pointer;
  color: var(--ink); background: var(--glass); box-shadow: 0 1px 2px rgb(0 0 0 / .18), 0 8px 24px rgb(0 0 0 / .18), inset 0 0 0 1px color-mix(in oklab, var(--hairline-2) 70%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px); text-decoration: none; -webkit-tap-highlight-color: transparent;
  transition: transform 140ms var(--ease), background 160ms var(--ease);
}
.mapbtn:active { transform: scale(.94); }
.mapbtn[aria-pressed="true"] { background: var(--leaf); color: var(--on-leaf); }
.mapbtn--compass [data-compass] { display: inline-grid; transition: transform 120ms linear; }
.maptop {
  position: absolute; top: calc(env(safe-area-inset-top, 0px) + 12px); left: 12px; right: 12px; z-index: 10;
  display: flex; gap: 10px; align-items: flex-start; pointer-events: none;
}
.maptop > * { pointer-events: auto; }
.mapsearch {
  position: relative; flex: 1; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 14px; color: var(--muted);
  background: var(--glass); box-shadow: 0 1px 2px rgb(0 0 0 / .18), 0 8px 24px rgb(0 0 0 / .18), inset 0 0 0 1px color-mix(in oklab, var(--hairline-2) 70%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
}
.mapsearch:focus-within { box-shadow: 0 0 0 2px var(--leaf), 0 8px 24px rgb(0 0 0 / .18); }
.mapsearch input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; color: var(--ink); font: 500 1rem var(--font-sans); }
.mapsearch input::placeholder { color: var(--faint); font-weight: 400; }
.mapsuggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none; max-height: min(60dvh, 420px); overflow-y: auto;
  border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-float), 0 0 0 1px var(--hairline);
}
.mapsuggest li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.mapsuggest li[aria-selected="true"] { background: var(--leaf-tint); }
.mapsuggest .ms__t { font-weight: 600; line-height: 1.25; }
.mapsuggest .ms__s { display: block; color: var(--muted); font-size: .8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mapsuggest .ms__head { display: block; padding: 8px 10px 4px; color: var(--faint); font-size: .75rem; font-weight: 650; cursor: default; }
.mapsuggest .ms__foot { display: block; padding: 6px 10px 4px; color: var(--faint); font-size: .6875rem; cursor: default; }
.mapctrls {
  position: absolute; right: 12px; top: calc(env(safe-area-inset-top, 0px) + 68px); z-index: 10; display: flex; flex-direction: column; gap: 8px;
}
.mapattrib {
  position: absolute; left: 12px; bottom: calc(var(--peek) + 10px); z-index: 5; display: flex; gap: 8px; margin: 0; padding: 4px 9px; border-radius: 999px;
  font-size: .6875rem; background: color-mix(in oklab, var(--surface) 66%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.mapattrib a { color: var(--muted); text-decoration: none; }
.mapattrib a:hover { text-decoration: underline; }
.mappanel {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(100dvh - env(safe-area-inset-top, 0px) - 64px);
  display: flex; flex-direction: column; border-radius: 22px 22px 0 0; background: var(--surface); color: var(--ink);
  box-shadow: 0 -1px 0 var(--hairline), 0 -12px 40px rgb(0 0 0 / .22);
  transform: translateY(calc(100% - var(--peek))); transition: transform 360ms cubic-bezier(.2, .8, .2, 1); will-change: transform; touch-action: none;
}
.mappanel[data-sheet="half"] { transform: translateY(48%); }
.mappanel[data-sheet="full"] { transform: none; }
.mappanel.is-dragging { transition: none; }
.mappanel__grip { flex: none; display: grid; place-items: center; height: 26px; cursor: grab; }
.mappanel__grip span { width: 38px; height: 5px; border-radius: 3px; background: var(--hairline-2); }
.mappanel__grip:focus-visible { outline: 2px solid var(--leaf); outline-offset: -4px; border-radius: 10px; }
.mappanel__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px calc(24px + env(safe-area-inset-bottom, 0px)); touch-action: pan-y; }
.mappanel[data-sheet="peek"] .mappanel__body { overflow: hidden; }
.mappanel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mappanel__title { margin: 0; font: 500 1.5rem/1.15 var(--font-serif); }
.mapfilters { display: flex; gap: 6px; overflow-x: auto; padding: 12px 0 4px; scrollbar-width: none; }
.mapfilters::-webkit-scrollbar { display: none; }
.mapchip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--hairline-2); font: 600 .8125rem/1 var(--font-sans); white-space: nowrap;
}
.mapchip[aria-pressed="true"] { background: var(--leaf-tint); color: var(--leaf); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--leaf) 40%, transparent); }
.mapchip__n { font-variant-numeric: tabular-nums; opacity: .8; }
.maplist { outline: none; }
.maplist__h { margin: 18px 4px 4px; color: var(--muted); font: 650 .8125rem/1.2 var(--font-sans); letter-spacing: .02em; }
.maplist__ul { list-style: none; margin: 0; padding: 0; }
.maplist__ul li[hidden] { display: none; }
.maplist__empty { margin: 18px 4px; color: var(--muted); line-height: 1.5; }
.maprow {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; min-height: 56px; padding: 7px 6px; border-radius: 12px;
  color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.maprow[aria-current="true"] { background: var(--leaf-tint); }
.maprow:focus-visible { outline: 2px solid var(--leaf); outline-offset: -2px; }
@media (hover: hover) { .maprow:hover { background: var(--surface-2); } }
.maprow__lead { display: inline-grid; place-items: center; width: 40px; }
.maprow__text { display: flex; flex-direction: column; min-width: 0; }
.maprow__title { font-weight: 600; line-height: 1.3; }
.maprow__sub { color: var(--muted); font-size: .8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.catdot { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; background: var(--cat, #7f8c8d); }
.catdot[data-cat="Home"] { --cat: #C98A2B; } .catdot[data-cat="Food"] { --cat: #D45A43; } .catdot[data-cat="Outdoors"] { --cat: #3E9369; }
.catdot[data-cat="Shopping"] { --cat: #9B5CC4; } .catdot[data-cat="Travel"] { --cat: #3C7FD0; } .catdot[data-cat="Church"] { --cat: #8C6A35; } .catdot[data-cat="Other"] { --cat: #6B7A80; }
.datebadge {
  width: 36px; height: 38px; border-radius: 9px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline-2); font: 700 1rem/1 var(--font-sans); color: var(--ink); overflow: hidden;
}
.datebadge b { display: block; width: 100%; text-align: center; padding: 2px 0; margin-bottom: 2px; background: var(--love); color: #fff; font-size: .5625rem; letter-spacing: .06em; text-transform: uppercase; }
.datebadge.is-past { filter: grayscale(1); opacity: .75; }
.mapcard { padding-top: 6px; }
.mapcard__back { margin: 0 0 6px -8px; }
.mapcard__kicker { margin: 4px 0 0; color: var(--muted); font-size: .8125rem; font-weight: 650; letter-spacing: .02em; display: flex; align-items: center; gap: 6px; }
.mapcard__title { margin: 4px 0 0; font: 500 1.625rem/1.15 var(--font-serif); text-wrap: balance; }
.mapcard__addr { margin: 6px 0 0; color: var(--muted); font-size: .9375rem; }
.mapcard__photos { display: grid; grid-auto-flow: column; grid-auto-columns: 128px; gap: 8px; overflow-x: auto; margin: 14px -16px 0; padding: 0 16px; scrollbar-width: none; }
.mapcard__photos img { width: 128px; height: 96px; object-fit: cover; border-radius: 12px; background: var(--surface-2); cursor: zoom-in; }
.mapcard__notes { margin: 14px 0 0; font: 400 1.0625rem/1.55 var(--font-serif); white-space: pre-line; }
.mapcard__acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.mapcard__acts .btn { flex-direction: column; gap: 4px; min-height: 64px; font-size: .8125rem; padding: 6px; }
.mapcard__by { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; color: var(--muted); font-size: .875rem; }
.mapcard__h { margin: 20px 0 4px; color: var(--muted); font: 650 .8125rem/1.2 var(--font-sans); }
.maptemp { width: 22px; height: 22px; border-radius: 50%; background: var(--leaf); box-shadow: 0 0 0 4px #fff, 0 4px 14px rgb(0 0 0 / .35); }
.mapme { width: 18px; height: 18px; border-radius: 50%; background: #3C8CF0; box-shadow: 0 0 0 3px #fff, 0 0 0 10px rgb(60 140 240 / .22), 0 2px 8px rgb(0 0 0 / .35); }
@media (prefers-reduced-motion: no-preference) { .mapme { animation: me-pulse 2.2s ease-out infinite; } }
@keyframes me-pulse { 0% { box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgb(60 140 240 / .35), 0 2px 8px rgb(0 0 0 / .35); } 100% { box-shadow: 0 0 0 3px #fff, 0 0 0 22px rgb(60 140 240 / 0), 0 2px 8px rgb(0 0 0 / .35); } }
.maplibregl-popup { display: none; }
.maplibregl-ctrl-attrib, .maplibregl-ctrl-logo { display: none !important; }

@media (min-width: 960px) {
  .mapapp { left: var(--side); --peek: 0px; }
  .maptop { left: 404px; right: 76px; max-width: 520px; }
  .mapbtn--back { display: none; }
  .mapctrls { top: 16px; right: 16px; }
  .mapattrib { left: auto; right: 16px; bottom: 16px; }
  .mappanel {
    left: 16px; top: 16px; bottom: 16px; right: auto; width: 372px; height: auto; transform: none !important; border-radius: 22px;
    background: color-mix(in oklab, var(--surface) 88%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(22px); backdrop-filter: saturate(1.6) blur(22px);
    box-shadow: var(--shadow-float), inset 0 0 0 1px color-mix(in oklab, var(--hairline-2) 70%, transparent); touch-action: auto;
  }
  .mappanel__grip { display: none; }
  .mappanel__body { padding: 20px 16px 20px; }
  .mappanel[data-sheet="peek"] .mappanel__body { overflow-y: auto; }
  .mapsuggest { min-width: 360px; }
}

/* the small map on an event's or a place's page */
.minimap {
  position: relative; display: block; margin-top: 14px; aspect-ratio: 16 / 9; border-radius: var(--r-card); overflow: hidden;
  background: #1b2124; box-shadow: var(--shadow-lift); color: #fff; text-decoration: none;
}
.minimap canvas { display: block; }
.minimap__pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); color: var(--love); filter: drop-shadow(0 2px 4px rgb(0 0 0 / .4)); }
.minimap.is-live .minimap__pin { display: none; }
.minimap__open {
  position: absolute; right: 10px; bottom: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 650; background: rgb(0 0 0 / .5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.geofield { position: relative; }
.geofield .mapsuggest { position: static; margin: 4px 0 8px; box-shadow: 0 0 0 1px var(--hairline), var(--shadow-lift); }
.minimap__marker { filter: drop-shadow(0 3px 6px rgb(0 0 0 / .35)); }

/* The map's chrome follows the map: dark glass on the dark map, light on the light one (the rest of the site keeps its theme) */
.mapapp[data-map-theme="dark"] {
  --surface: #182023; --surface-2: #1e272b; --ink: #e8eeea; --ink-2: #ccd5d0; --muted: #9aa8a1; --faint: #7a8781;
  --hairline: #263136; --hairline-2: #33424a; --leaf: #9cc2ae; --leaf-tint: #1f2e28; --on-leaf: #0e1412; --love: #e8828f;
  --glass: rgb(24 31 34 / .78); color-scheme: dark;
}
.mapapp[data-map-theme="light"] { --glass: rgb(255 255 255 / .82); }
.mapapp[data-map-theme="dark"] .mappanel { box-shadow: 0 -1px 0 var(--hairline), 0 -12px 40px rgb(0 0 0 / .5); }
.mapapp[data-map-theme="dark"] .datebadge { background: #e8eeea; color: #1d2326; }
@media (min-width: 960px) {
  .mapapp[data-map-theme="dark"] .mappanel { background: rgb(24 31 34 / .86); box-shadow: 0 1px 2px rgb(0 0 0 / .4), 0 18px 48px rgb(0 0 0 / .5), inset 0 0 0 1px rgb(255 255 255 / .06); }
}
/* the clear button keeps its place while hidden, so the search box never changes size as you type */
.spanel__clear.is-off { visibility: hidden; }
