/* Ellie's Way Group — Christmas Card Exchange
   Design system. Brand from elliesway.org: deep plum frame, mulberry actions, orchid accents,
   a sunset glow, Lato headings and Open Sans text. Built for older eyes and phones first:
   generous type that follows the reader's text size, strong contrast, 44pt touch targets,
   visible focus, calm motion. Sizes are in rem so the reader's text-size setting is honored. */

@font-face { font-family: 'Lato'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/lato-400.woff2) format('woff2'); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/lato-700.woff2) format('woff2'); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 900; font-display: swap; src: url(/fonts/lato-900.woff2) format('woff2'); }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 300 800; font-display: swap; src: url(/fonts/open-sans-var.woff2) format('woff2'); }

/* ---------------------------------------------------------------------------------- Tokens */
:root {
  color-scheme: only light;

  /* Brand */
  --plum: #2e243d;
  --plum-800: #3d2f50;
  --mulberry: #833372;
  --mulberry-700: #69295b;
  --orchid-600: #9b5187;   /* fills with white text (5.4:1) */
  --orchid: #b86ea1;       /* decorative only — never text on white */
  --orchid-100: #f5e8f1;
  --orchid-50: #fbf5fa;
  --blush: #fad6e5;        /* the logo's heart; used on plum */
  --candle: #a67a22;
  --candle-soft: #fbf0d9;
  --candle-glow: #f3c08e;

  /* Neutrals (from elliesway.org's cool grey) */
  --page: #eef0f2;
  --paper: #ffffff;
  --sunken: #f7f8f9;
  --line: #dde2e5;
  --line-strong: #c9d0d5;
  --control: #868f99;      /* form field borders, 3.3:1 */
  --ink: #2e243d;
  --ink-2: #574a60;        /* secondary text, 7:1 */

  /* Status */
  --ok: #24605b;   --ok-soft: #e1f0ee;   --ok-text: #1f524e;   --ok-line: #bcd9d5;
  --info: #2f4a6e; --info-soft: #e3ebf5; --info-line: #b9cbe3;
  --warn: #7a4f0c; --warn-soft: #fbf0d9; --warn-line: #e9cf9a;
  --danger: #a12f45; --danger-soft: #f8e3e7; --danger-text: #7a2234; --danger-line: #e8bcc6;

  /* Sunset: for text-bearing surfaces (contrast-checked) and a decorative variant */
  --sunset: linear-gradient(170deg, #2e243d 0%, #4b2a59 40%, #7a2f6c 72%, #9c4f88 100%);
  --sunset-glow: radial-gradient(ellipse 70% 32% at 50% 100%, rgba(243, 192, 142, 0.3), transparent 72%);
  --sunset-line: linear-gradient(90deg, #833372, #b86ea1, #e9a2a6, #f3c08e);

  /* Focus */
  --focus: var(--mulberry-700);
  --focus-on-dark: var(--blush);

  /* Type */
  --heading: 'Lato', 'Helvetica Neue', Arial, sans-serif;
  --sans: 'Open Sans', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --quote: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --text-display: clamp(1.75rem, 1.2rem + 2.4vw, 2.5rem);
  --text-h1: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
  --text-h2: clamp(1.375rem, 1.27rem + .5vw, 1.625rem);
  --text-h3: clamp(1.1875rem, 1.13rem + .3vw, 1.3125rem);
  --text-lead: clamp(1.125rem, 1.06rem + .3vw, 1.25rem);
  --text-body: clamp(1.0625rem, 1.03rem + .15vw, 1.125rem);
  --text-ui: 1.0625rem;
  --text-hint: 1rem;
  --text-caption: .9375rem;
  --measure: 62ch;

  /* Space (4/8 scale) */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem; --s-6: 2rem; --s-7: 3rem; --s-8: 4rem;
  --frame: 1080px;
  --column: 820px;
  --gutter: 16px;

  /* Shape & depth */
  --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-pill: 999px;
  --e1: 0 1px 2px rgba(46, 36, 61, .06), 0 4px 14px rgba(46, 36, 61, .06);
  --e2: 0 2px 4px rgba(46, 36, 61, .08), 0 12px 32px rgba(46, 36, 61, .12);
  --tabbar-h: 0px;
}
@media (min-width: 48em) { :root { --gutter: 24px; } }

/* -------------------------------------------------------------------------------- Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--plum); scroll-padding-top: var(--s-4); }
/* Pages with the sticky admin toolbar: keep the focused row clear of it */
html:has(.toolbar) { scroll-padding-top: 9rem; }
@supports (font: -apple-system-body) and (-webkit-touch-callout: none) {
  html { font: -apple-system-body; } /* follows the iPhone's Larger Text setting */
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 var(--text-body)/1.6 var(--sans);
  font-synthesis: weight;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}
body.has-tabbar { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }

h1, h2, h3 { font-family: var(--heading); font-weight: 700; line-height: 1.2; color: var(--plum); text-wrap: balance; }
h1 { font-size: var(--text-h1); line-height: 1.15; letter-spacing: -.015em; margin: 0 0 var(--s-3); }
h2 { font-size: var(--text-h2); letter-spacing: -.01em; margin: 0 0 var(--s-3); }
h3 { font-size: var(--text-h3); line-height: 1.25; margin: 0 0 var(--s-2); }
p { margin: 0 0 var(--s-4); }
main p { max-width: var(--measure); }
a { color: var(--mulberry); text-underline-offset: 3px; text-decoration-thickness: 1px; }
strong { font-weight: 700; }
code { background: var(--orchid-100); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
img { max-width: 100%; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.site-header :focus-visible, .site-footer :focus-visible, .hero :focus-visible, .tabbar :focus-visible, .tree-scene :focus-visible, .share-card :focus-visible { outline-color: var(--focus-on-dark); }

.icon { width: 1.15em; height: 1.15em; vertical-align: -.2em; flex: none; }
.mark { width: 1em; height: 1.125em; vertical-align: -.15em; color: var(--mulberry); --heart: var(--orchid); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: var(--s-3); top: 0; transform: translateY(-120%); z-index: 100; background: var(--paper); color: var(--plum); padding: var(--s-3) var(--s-4); border-radius: var(--r-sm); font-weight: 700; }
.skip-link:focus { top: var(--s-3); transform: none; }

.muted { color: var(--ink-2); }
.small { font-size: var(--text-hint); }
.center { text-align: center; margin-inline: auto; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.pre { white-space: pre-wrap; margin: 0; }
.stack > * + * { margin-top: var(--s-4); }
[hidden] { display: none !important; }

/* -------------------------------------------------------------------------- Header */
.site-header { background: var(--plum); color: #fff; padding-top: env(safe-area-inset-top); position: relative; z-index: 10; }
.site-header::after { content: ''; display: block; height: 4px; background: var(--sunset-line); }
.header-inner { max-width: var(--frame); margin: 0 auto; padding: var(--s-3) max(var(--gutter), env(safe-area-inset-right)) var(--s-3) max(var(--gutter), env(safe-area-inset-left)); display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: var(--s-4); color: #fff; text-decoration: none; min-height: 44px; }
.brand-logo { height: 56px; width: auto; display: block; }
.brand-sub { font: 700 .78rem/1.3 var(--heading); letter-spacing: .14em; text-transform: uppercase; color: var(--blush); padding-left: var(--s-4); border-left: 1px solid rgba(250, 214, 229, .35); }
.nav { display: flex; align-items: center; gap: var(--s-1); margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.nav a { display: inline-flex; align-items: center; gap: var(--s-2); color: #fff; text-decoration: none; padding: var(--s-2) var(--s-3); min-height: 44px; border-radius: var(--r-pill); font: 600 var(--text-ui)/1.2 var(--sans); }
.nav a[aria-current='page'] { background: rgba(250, 214, 229, .16); box-shadow: inset 0 0 0 1px rgba(250, 214, 229, .35); }
.nav .nav-join { background: var(--blush); color: var(--plum); padding-inline: var(--s-4); }
.nav .icon, .nav .short { display: none; }

/* Phones: logo + one compact row of tabs; in Home Screen mode a bottom tab bar replaces it. */
@media (max-width: 40em) {
  .header-inner { gap: var(--s-2) var(--s-3); padding-block: var(--s-2); }
  .brand-logo { height: 44px; }
  .brand-sub { font-size: .75rem; padding-left: var(--s-3); }
  .nav { width: 100%; margin: 0; flex-wrap: nowrap; justify-content: space-between; gap: 0; }
  .nav a { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 2px; padding: var(--s-1) 2px; font-size: .875rem; line-height: 1.15; text-align: center; min-height: 52px; border-radius: var(--r-sm); }
  .nav .icon { display: block; width: 22px; height: 22px; }
  .site-header.member .nav .full { display: none; }
  .site-header.member .nav .short { display: inline; }
  .nav .nav-join { flex: 0 0 auto; padding-inline: var(--s-4); flex-direction: row; font-size: var(--text-ui); }
  .site-header.public .nav { width: auto; margin-left: auto; gap: var(--s-2); flex-wrap: wrap; justify-content: flex-end; }
  .site-header.public .nav a { flex: 0 0 auto; flex-direction: row; font-size: var(--text-ui); min-height: 44px; padding-inline: var(--s-3); }
  .site-header.public .nav .icon { display: none; }
}
.tabbar { display: none; }
@media (max-width: 40em) and (display-mode: standalone) {
  :root { --tabbar-h: 64px; }
  .has-tabbar .site-header .nav { display: none; }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; inset: auto 0 0; z-index: 50;
    padding: 6px max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    background: rgba(46, 36, 61, .94); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
    border-top: .5px solid rgba(255, 255, 255, .18);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; color: rgba(255, 255, 255, .78); text-decoration: none; font: 600 .8125rem/1.1 var(--sans); }
  .tabbar .icon { width: 26px; height: 26px; }
  .tabbar a[aria-current='page'] { color: #fff; }
  .tabbar a[aria-current='page'] .icon { color: var(--blush); }
  body:has(:is(input, textarea, select):focus) .tabbar { display: none; }
}

/* -------------------------------------------------------------------------- Footer */
.site-footer { background: var(--plum); color: rgba(255, 255, 255, .86); font-size: var(--text-hint); }
.site-footer .wrap { max-width: var(--frame); padding-top: var(--s-6); padding-bottom: calc(var(--s-6) + env(safe-area-inset-bottom)); }
.site-footer a { color: #fff; }
.site-footer p { margin: 0 0 var(--s-2); max-width: none; }
.footer-tagline { display: flex; align-items: center; gap: var(--s-2); font: 700 1.125rem/1.3 var(--heading); color: #fff; margin-bottom: var(--s-3) !important; }
.footer-tagline .mark { color: var(--blush); --heart: var(--orchid); width: 1.4em; height: 1.55em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 var(--s-4); }
.footer-links a, .footer-links button { display: inline-flex; align-items: center; min-height: 44px; }

/* -------------------------------------------------------------------------- Page frame */
.wrap { max-width: var(--column); margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }
main.wrap { padding-top: var(--s-6); padding-bottom: var(--s-8); min-height: 55vh; }
main.wide { max-width: var(--frame); }
main.narrow { max-width: calc(480px + 2 * var(--gutter)); }
main.medium { max-width: calc(640px + 2 * var(--gutter)); }
main > :first-child { margin-top: 0; }
@media (max-width: 40em) { main.wrap { padding-top: var(--s-5); padding-bottom: var(--s-7); } }

.page-head { margin-bottom: var(--s-5); }
.page-head p { color: var(--ink-2); font-size: var(--text-lead); margin: 0; }
.eyebrow { font: 700 var(--text-caption)/1.3 var(--heading); letter-spacing: .12em; text-transform: uppercase; color: var(--mulberry); margin: 0 0 var(--s-2); }
.lead { font-size: var(--text-lead); line-height: 1.55; color: var(--ink-2); }
.back { display: inline-flex; align-items: center; gap: var(--s-1); min-height: 44px; margin: calc(-1 * var(--s-3)) 0 var(--s-2); text-decoration: none; font-weight: 600; }
section > h2, .section-head { margin: var(--s-7) 0 var(--s-3); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head .count { color: var(--ink-2); font: 600 var(--text-hint) var(--sans); }

/* -------------------------------------------------------------------------- Cards */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-5); margin: 0 0 var(--s-4); box-shadow: var(--e1); }
.card.quiet { background: transparent; box-shadow: none; border-color: var(--line-strong); }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card h2:first-child { margin-top: 0; }
@media (max-width: 40em) { .card { padding: var(--s-4); } }

/* -------------------------------------------------------------------------- Hero (home) */
.hero {
  background: var(--sunset-glow), var(--sunset);
  color: #fff; text-align: center;
  padding: var(--s-8) max(var(--gutter), env(safe-area-inset-left)) var(--s-7);
}
.hero > * { max-width: 680px; margin-inline: auto; }
.hero .eyebrow { color: var(--blush); }
.hero h1 { color: #fff; font: 900 var(--text-display)/1.08 var(--heading); letter-spacing: .02em; text-transform: uppercase; margin: var(--s-2) auto var(--s-4); text-shadow: 0 2px 16px rgba(46, 36, 61, .35); }
.hero .lead { color: #fff; max-width: 34em; }
.hero-status { margin-top: var(--s-5); }
.hero-status p { margin: 0 auto var(--s-4); max-width: 34em; }
.hero-status .actions { justify-content: center; }
.hero .btn-quiet { color: #fff; border-color: rgba(255, 255, 255, .8); }
@media (hover: hover) { .hero .btn-quiet:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: #fff; } }

.steps { padding-left: 1.4em; margin: 0; }
.steps li { margin-bottom: var(--s-3); padding-left: var(--s-1); }
.steps li::marker { color: var(--mulberry); font: 700 1em var(--heading); }

.dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); margin: 0; }
.dates div { background: var(--orchid-50); border: 1px solid var(--orchid-100); border-radius: var(--r-sm); padding: var(--s-3) var(--s-4); }
.dates dt { font-size: var(--text-caption); color: var(--ink-2); line-height: 1.35; }
.dates dd { margin: 2px 0 0; font: 700 1.0625rem/1.3 var(--heading); color: var(--plum); text-wrap: balance; }
@media (max-width: 30em) { .dates { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------------------- Messages */
.flash { display: flex; gap: var(--s-3); align-items: flex-start; border-radius: var(--r-sm); padding: var(--s-3) var(--s-4); margin: 0 0 var(--s-5); border: 1px solid; font-weight: 600; }
.flash .icon { margin-top: .2em; }
.flash { flex-wrap: wrap; }
.flash > span { flex: 1 1 12rem; }
.flash .flash-action { margin: -.25rem 0 -.25rem auto; }
.flash-ok { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok-text); }
.flash-error { background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger-text); }
.flash:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
.card .flash { margin: 0 0 var(--s-4); }

.error-summary { background: var(--danger-soft); border: 2px solid var(--danger); border-radius: var(--r-md); padding: var(--s-4) var(--s-5); margin: 0 0 var(--s-5); color: var(--danger-text); }
.error-summary h2 { color: var(--danger-text); font-size: var(--text-h3); margin: 0 0 var(--s-2); }
.error-summary ul { margin: 0; padding-left: 1.2em; }
.error-summary a { color: var(--danger-text); font-weight: 600; }
.field-error { color: var(--danger-text); font-weight: 600; font-size: var(--text-hint); margin: var(--s-1) 0 0; }

.notice { display: flex; gap: var(--s-3); align-items: flex-start; border-radius: var(--r-sm); padding: var(--s-3) var(--s-4); margin: 0 0 var(--s-4); background: var(--info-soft); color: var(--info); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice .icon { margin-top: .2em; }
.notice p:last-child { margin: 0; }

/* -------------------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: var(--s-2) var(--s-5); border-radius: 28px;
  border: 2px solid var(--mulberry); background: var(--mulberry); color: #fff;
  font: 600 var(--text-ui)/1.2 var(--sans); text-decoration: none; cursor: pointer; text-align: center;
  touch-action: manipulation; transition: background-color .18s, border-color .18s, color .18s, transform .12s, box-shadow .18s;
}
.btn:active { transform: scale(.975); }
.btn[aria-busy='true'] { opacity: .7; pointer-events: none; }
.btn-big { min-height: 56px; font-size: 1.125rem; padding-inline: var(--s-6); }
.btn-small { min-height: 44px; padding-inline: var(--s-4); font-size: var(--text-hint); }
.btn-full { width: 100%; }
.btn-quiet { background: transparent; color: var(--mulberry); }
.btn-hero { background: var(--blush); border-color: var(--blush); color: var(--plum); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-plain { background: none; border-color: transparent; color: var(--mulberry); padding-inline: var(--s-3); text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) {
  .btn:hover { background: var(--plum); border-color: var(--plum); color: #fff; }
  .btn-quiet:hover { background: var(--orchid-100); border-color: var(--mulberry); color: var(--plum); }
  .btn-hero:hover { background: #fff; border-color: #fff; }
  .btn-plain:hover { background: var(--orchid-50); color: var(--plum); }
  .btn-danger:hover { background: var(--danger-text); border-color: var(--danger-text); }
  a:hover { color: var(--plum); }
}
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--mulberry); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; }
.linklike.danger { color: var(--danger); }
.actions { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; margin-top: var(--s-5); }
.actions:first-child { margin-top: 0; }
form.inline { display: inline; margin: 0; }
@media (max-width: 40em) {
  .actions:not(.keep-row) { flex-direction: column; align-items: stretch; }
  .actions:not(.keep-row) > form.inline { display: flex; }
  .actions:not(.keep-row) > form.inline > .btn, .actions:not(.keep-row) > .btn { width: 100%; }
}

/* -------------------------------------------------------------------------- Forms */
.field, fieldset, .check { margin: 0 0 var(--s-5); }
.field label, fieldset > legend { display: block; font-weight: 600; line-height: 1.35; margin-bottom: var(--s-2); padding: 0; }
.optional { font-weight: 400; color: var(--ink-2); }
.hint { color: var(--ink-2); font-size: var(--text-hint); line-height: 1.5; margin: 0 0 var(--s-2); }
.form-intro { color: var(--ink-2); margin-bottom: var(--s-5); }
input[type='text'], input[type='email'], input[type='password'], input[type='tel'], input[type='number'], input[type='date'], input[type='search'], input[type='url'], select, textarea {
  width: 100%; font: 400 max(1rem, var(--text-body)) / 1.4 var(--sans); color: var(--ink); background: #fff;
  border: 2px solid var(--control); border-radius: 12px; padding: var(--s-3); min-height: 52px;
}
input[type='date'] { -webkit-appearance: none; appearance: none; text-align: left; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--mulberry); outline: 3px solid var(--mulberry); outline-offset: 2px; }
input[aria-invalid='true'], select[aria-invalid='true'], textarea[aria-invalid='true'] { border-color: var(--danger); }
textarea { resize: vertical; min-height: 7rem; }
fieldset { border: 0; padding: 0; min-width: 0; }
.radios label, .check label { display: flex; gap: var(--s-3); align-items: flex-start; font-weight: 400; padding: var(--s-2) 0; cursor: pointer; min-height: 44px; }
.radios input, .check input { width: 24px; height: 24px; margin: .1em 0 0; flex: none; accent-color: var(--mulberry); }
.check .hint { display: block; margin: 2px 0 0; }
.choice-pills { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.choice-pills label { display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--s-4); border: 2px solid var(--control-border, #868f99); border-radius: var(--r-pill); background: #fff; cursor: pointer; font-weight: 600; }
.choice-pills input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-pills input:checked + span { color: #fff; }
.choice-pills label:has(input:checked) { background: var(--mulberry); border-color: var(--mulberry); color: #fff; }
.choice-pills label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s-4); align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 var(--s-4); align-items: start; }
@media (max-width: 40em) { .grid-2:not(.pair), .grid-3 { grid-template-columns: 1fr; } }
.pin-row { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: stretch; }
.pin-row input { flex: 1 1 9rem; min-width: 0; }
.pin-row .btn { min-height: 52px; flex: none; }
.form-section { margin-bottom: var(--s-5); }
.form-section > h2 { margin-bottom: var(--s-2); }
.form-section > .eyebrow { margin-bottom: var(--s-1); }
.submit-card .actions { margin-top: var(--s-4); }
.inline-form { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: end; }
.inline-form .field { margin: 0; min-width: 12rem; }
.inline-form select { width: auto; min-width: min(12rem, 100%); max-width: 100%; }

/* Disclosures (optional sections) */
details.disclosure { border-top: 1px solid var(--line); margin-top: var(--s-2); }
details.disclosure > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--s-2); min-height: 48px; font-weight: 600; color: var(--mulberry); }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary .icon { transition: transform .2s; }
details.disclosure[open] > summary .icon { transform: rotate(90deg); }
details.disclosure > .disclosure-body { padding-top: var(--s-3); }

/* -------------------------------------------------------------------------- Badges */
.badge { display: inline-flex; align-items: center; gap: .3em; max-width: 100%; overflow-wrap: break-word; font: 700 var(--text-caption)/1.25 var(--sans); padding: .2em .7em; border-radius: var(--r-pill); border: 1px solid transparent; }
.badge .icon { width: 1em; height: 1em; vertical-align: 0; }
.badge-neutral { background: #eef0f2; color: #3e4650; }
.badge-outline { background: #fff; border-color: var(--line-strong); color: var(--ink-2); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-success { background: var(--ok); color: #fff; }
.badge-success-soft { background: var(--ok-soft); color: var(--ok-text); }
.badge-warning { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger-text); }
.badge-accent { background: var(--orchid-100); color: var(--mulberry-700); }
.badge-candle { background: var(--candle-soft); color: #6e4f12; }
.badges { display: flex; gap: var(--s-2); flex-wrap: wrap; }

/* -------------------------------------------------------------------------- My Cards */
.status-card { padding: var(--s-5); }
.status-card h2 { font-size: var(--text-h3); margin-bottom: var(--s-1); }
.progress { height: 12px; background: #e2e6ea; border-radius: var(--r-pill); overflow: hidden; margin: var(--s-3) 0 var(--s-2); }
.progress > span { display: block; height: 100%; background: var(--mulberry); border-radius: var(--r-pill); transition: width .7s cubic-bezier(.22, .61, .36, 1); }
.status-links { display: flex; flex-direction: column; gap: var(--s-1); margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.status-links a { display: flex; align-items: center; gap: var(--s-2); min-height: 44px; font-weight: 600; }
.all-mailed { display: flex; align-items: center; gap: var(--s-2); color: var(--mulberry); font-weight: 700; margin: var(--s-2) 0 0; }

/* A person you're writing to */
details.person { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); margin: 0 0 var(--s-3); box-shadow: var(--e1); scroll-margin-top: var(--s-4); }
details.person > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: var(--s-1) var(--s-3); align-items: center; padding: var(--s-4) var(--s-5); min-height: 64px; }
details.person > summary::-webkit-details-marker { display: none; }
details.person > summary .who { font: 700 var(--text-h3)/1.25 var(--heading); color: var(--plum); }
details.person > summary .where { color: var(--ink-2); font-size: var(--text-hint); }
details.person > summary .sub { grid-column: 1 / -1; color: var(--ink-2); font-size: var(--text-hint); display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); }
details.person > summary .chev { grid-column: 2; grid-row: 1 / span 2; color: var(--ink-2); transition: transform .2s; }
details.person[open] > summary .chev { transform: rotate(180deg); }
details.person[open] > summary { border-bottom: 1px solid var(--line); }
details.person.done { background: var(--sunken); box-shadow: none; }
.person-body { padding: var(--s-4) var(--s-5) var(--s-5); display: grid; grid-template-columns: 1fr minmax(240px, 280px); gap: var(--s-4) var(--s-5); }
.person-body > * { grid-column: 1 / -1; margin: 0; }
.person-body > .about { grid-column: 1; }
.person-body > .envelope-block { grid-column: 2; grid-row: 1 / span 3; align-self: start; }
.person-body > .actions { border-top: 1px solid var(--line); padding-top: var(--s-4); margin: 0; }
.person-body > .actions .linklike { margin-left: auto; }
@media (max-width: 40em) {
  details.person > summary { padding: var(--s-3) var(--s-4); }
  .person-body { grid-template-columns: 1fr; padding: var(--s-3) var(--s-4) var(--s-4); }
  .person-body > .envelope-block { grid-column: 1; grid-row: auto; }
  .person-body > .actions .linklike { margin: 0 auto; }
}
details.person:target, details.person.just-done { animation: settle 1.8s ease-out; }
@keyframes settle { from { box-shadow: 0 0 0 4px var(--blush), var(--e2); } }

.about p { margin: 0 0 var(--s-2); }
.remembering { font-size: var(--text-body); }
.loved-name { font: 700 1.1em/1.3 var(--heading); color: var(--mulberry); letter-spacing: .005em; }
.first-xmas { display: flex; gap: var(--s-2); align-items: flex-start; background: var(--candle-soft); border-left: 3px solid var(--candle); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: var(--s-2) var(--s-3); color: #4f3a10; }
.first-xmas .icon { color: var(--candle); }
.writer-note { border-left: 3px solid var(--orchid); padding-left: var(--s-3); color: #4d4157; }
.writer-note .note-label { display: block; font-weight: 700; color: var(--ink-2); font-size: var(--text-hint); }
.prefs { margin: var(--s-1) 0 0; padding-left: 1.2em; color: #4d4157; }
.envelope {
  font-style: normal; font-size: 1.0625rem; line-height: 1.5; background: #fff; border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); padding: var(--s-3) var(--s-4); box-shadow: inset 0 0 0 4px var(--orchid-50); min-width: 0;
}
.envelope-label { font-size: var(--text-caption); color: var(--ink-2); margin: 0 0 var(--s-1); font-weight: 600; }

/* Cards coming to you: one grouped list */
.rows { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--e1); overflow: hidden; margin: 0 0 var(--s-4); padding: 0; list-style: none; }
.rows > li { display: grid; grid-template-columns: 1fr auto; gap: var(--s-1) var(--s-4); align-items: center; padding: var(--s-4) var(--s-5); scroll-margin-top: var(--s-4); }
.rows > li + li { border-top: 1px solid var(--line); }
.rows .who { font: 700 1.0625rem/1.3 var(--heading); color: var(--plum); }
.rows .meta { color: var(--ink-2); font-size: var(--text-hint); }
.rows .sent-note { flex-basis: 100%; font: italic var(--text-hint)/1.5 var(--quote); color: var(--ink); }
.rows .row-action { grid-column: 2; grid-row: 1 / span 2; }
.rows > li.is-done { background: var(--sunken); }
@media (max-width: 40em) {
  .rows > li { grid-template-columns: 1fr; padding: var(--s-3) var(--s-4); }
  .rows .row-action { grid-column: 1; grid-row: auto; }
  .rows .row-action .btn { width: 100%; }
}

.thanks blockquote, blockquote.note-quote { margin: 0 0 var(--s-3); padding: var(--s-3) var(--s-4); border-left: 4px solid var(--orchid); background: var(--orchid-50); border-radius: 0 var(--r-sm) var(--r-sm) 0; font: italic 1.125rem/1.55 var(--quote); color: var(--ink); hanging-punctuation: first; }
.thanks cite { display: block; margin-top: var(--s-1); font: normal var(--text-hint) var(--sans); color: var(--ink-2); }
.thanks blockquote.is-new { animation: unfold .6s ease-out both; }
.thanks blockquote.is-new:nth-child(2) { animation-delay: .12s; }
.thanks blockquote.is-new:nth-child(3) { animation-delay: .24s; }
@keyframes unfold { from { opacity: 0; transform: translateY(8px); } }

.help-list { list-style: none; padding: 0; margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.help-list li + li { border-top: 1px solid var(--line); }
.help-list a, .help-list button { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); width: 100%; min-height: 56px; padding: var(--s-3) var(--s-5); color: var(--ink); text-decoration: none; font: 600 var(--text-body) var(--sans); background: none; border: 0; cursor: pointer; text-align: left; }
.help-list .icon { color: var(--ink-2); }
.help-list .help-note { display: block; padding: var(--s-3) var(--s-5); color: var(--ink-2); font-size: var(--text-hint); line-height: 1.5; }
.help-list .option-hint { font-weight: 400; }
@media (hover: hover) { .help-list a:hover, .help-list button:hover { background: var(--sunken); } }

.kv { display: grid; grid-template-columns: minmax(9rem, auto) 1fr; gap: var(--s-2) var(--s-4); margin: 0 0 var(--s-4); }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; }
.kv > * { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 40em) { .kv { grid-template-columns: 1fr; gap: 0; } .kv dt { margin-top: var(--s-3); } }

.empty { text-align: center; padding: var(--s-6) var(--s-4); color: var(--ink-2); }
.empty .mark { width: 2.5rem; height: 2.8rem; color: #c9c2d0; --heart: #e3c6d7; display: block; margin: 0 auto var(--s-3); }

/* -------------------------------------------------------------------------- Tree of Names */
.tree-scene {
  position: relative; max-width: 820px; margin: var(--s-5) auto; padding: var(--s-6) var(--s-4) var(--s-6); border-radius: var(--r-lg); color: #fff; text-align: center;
  background: radial-gradient(ellipse 60% 45% at 50% 42%, rgba(243, 192, 142, .16), transparent 70%), linear-gradient(#2e243d, #3d2f50 70%, #4a2f57);
  box-shadow: var(--e2);
}
.tree-scene h1 { color: #fff; }
.tree-scene .lead { color: rgba(255, 255, 255, .88); margin-inline: auto; }
.tree-topper { width: 64px; height: 72px; color: #eef0f0; --heart: var(--blush); filter: drop-shadow(0 0 12px rgba(243, 192, 142, .7)); margin: var(--s-4) auto var(--s-2); display: block; }
.tree { list-style: none; margin: 0; padding: 0; }
.tier { list-style: none; margin: -4px auto 0; padding: 14px 10px 18px; width: min(100%, max(var(--w), 11em)); display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; position: relative; isolation: isolate; }
.tier::before { content: ''; position: absolute; inset: 0 calc(-1 * var(--s-3)); z-index: -1; background: rgba(184, 110, 161, .17); clip-path: polygon(24% 0, 76% 0, 100% 100%, 0 100%); }
.light { font: 700 clamp(1rem, .95rem + .4vw, 1.1875rem)/1.3 var(--heading); white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; color: #fff; }
.light::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c, #f3c08e); box-shadow: 0 0 8px 2px var(--c, #f3c08e); animation: twinkle var(--t, 6s) ease-in-out var(--d, 0s) 2 alternate; flex: none; }
.light.mine { padding: 2px 10px; border-radius: var(--r-pill); box-shadow: 0 0 0 1.5px var(--candle-glow), 0 0 18px rgba(243, 192, 142, .45); }
@keyframes twinkle { from { opacity: .5; } }
.tree-base { width: 40px; height: 22px; background: #5a4150; margin: 0 auto; border-radius: 0 0 6px 6px; box-shadow: 0 18px 30px 10px rgba(243, 192, 142, .14); }
.tree-caption { margin-top: var(--s-5); color: rgba(255, 255, 255, .9); display: flex; gap: var(--s-2); justify-content: center; align-items: center; }
.tree-caption .icon { color: var(--candle-glow); }
.tree-foot { margin: var(--s-4) auto 0; }

/* -------------------------------------------------------------------------- Labels (Avery 5160) */
body.bare { background: #fff; }
body.bare main.wrap { max-width: calc(8.5in + 2 * var(--gutter)); overflow-x: auto; }
.label-sheet { width: 8.5in; height: 11in; margin: 0 auto var(--s-5); padding: .5in .1875in; background: #fff; box-shadow: var(--e2); display: grid; grid-template-columns: repeat(3, 2.625in); grid-template-rows: repeat(10, 1in); column-gap: .125in; align-content: start; }
/* Avery L7160: A4, 3 × 7 labels of 63.5 × 38.1 mm */
.label-sheet.a4 { width: 210mm; height: 297mm; padding: 15.15mm 7.25mm; grid-template-columns: repeat(3, 63.5mm); grid-template-rows: repeat(7, 38.1mm); column-gap: 2.5mm; }
.label { padding: .08in .15in; font: 11pt/1.2 var(--sans); overflow: hidden; display: flex; flex-direction: column; justify-content: center; outline: 1px dashed #ddd; }
.label div:first-child { font-weight: 600; }
.label.blank { outline-style: dotted; }
/* Long addresses (often overseas) shrink to fit the label instead of losing lines */
.label.l6 { font-size: 9.5pt; line-height: 1.12; }
.label.l7 { font-size: 8.5pt; line-height: 1.08; padding-top: .04in; padding-bottom: .04in; }
.label-sheet.a4 .label.l7 { font-size: 9pt; }

/* -------------------------------------------------------------------------- Admin */
.admin-nav { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0 calc(-1 * var(--gutter)) var(--s-5); padding: 0 var(--gutter) var(--s-3); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.admin-nav::-webkit-scrollbar { display: none; }
.admin-nav a { flex: none; display: inline-flex; align-items: center; gap: var(--s-2); scroll-snap-align: start; text-decoration: none; min-height: 44px; padding: 0 var(--s-4); border-radius: var(--r-pill); font: 600 var(--text-hint) var(--sans); color: var(--plum); background: var(--paper); border: 1px solid var(--line); }
.admin-nav a[aria-current='page'] { background: var(--plum); color: #fff; border-color: var(--plum); }
.admin-nav .count { background: var(--danger); color: #fff; border-radius: var(--r-pill); font-size: .875rem; padding: 0 .5em; min-width: 1.5em; text-align: center; }
.admin-nav a[aria-current='page'] .count { background: var(--blush); color: var(--plum); }

.stepper { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; color: var(--ink-2); font-size: var(--text-hint); margin-bottom: var(--s-4); }
.stepper .bar { flex: 1 1 12rem; height: 8px; background: #e2e6ea; border-radius: var(--r-pill); overflow: hidden; }
.stepper .bar span { display: block; height: 100%; background: var(--mulberry); }
.stepper strong { color: var(--plum); }
.whats-next { background: var(--paper); border: 2px solid var(--mulberry); border-radius: var(--r-md); padding: var(--s-5); margin-bottom: var(--s-5); box-shadow: var(--e2); }
.whats-next h2 { margin: 0 0 var(--s-2); font-size: var(--text-h3); }
.whats-next p { margin-bottom: 0; }
.needs-you { list-style: none; padding: 0; margin: 0; }
.needs-you li { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); align-items: center; padding: var(--s-3) 0; border-top: 1px solid var(--line); }
.needs-you li:first-child { border-top: 0; }
.needs-you .text { flex: 1 1 16rem; }
.meter { display: grid; grid-template-columns: 6rem 1fr auto; gap: var(--s-3); align-items: center; margin-bottom: var(--s-2); }
.meter .bar { height: 12px; background: #e2e6ea; border-radius: var(--r-pill); overflow: hidden; }
.meter .bar span { display: block; height: 100%; background: var(--mulberry); }
.meter.arrived .bar span { background: var(--ok); }
@media (max-width: 24em) { .meter { grid-template-columns: 1fr auto; } .meter .bar { grid-column: 1 / -1; grid-row: 2; } }
.coming-up { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); gap: var(--s-2) var(--s-5); }
.coming-up li { display: flex; gap: var(--s-3); min-width: 0; }
.coming-up li > * { min-width: 0; overflow-wrap: break-word; }
.coming-up .when { font-weight: 700; color: var(--plum); min-width: 4.5rem; font-variant-numeric: tabular-nums; }
.health-ok { display: flex; gap: var(--s-2); align-items: center; color: var(--ok-text); font-weight: 600; margin: 0; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr)); gap: var(--s-4); align-items: start; }

.toolbar { position: sticky; top: 0; max-height: 40vh; overflow: auto; z-index: 5; background: var(--page); padding: var(--s-3) 0; margin-bottom: var(--s-3); display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); align-items: center; border-bottom: 1px solid var(--line); }
.toolbar input[type='search'] { max-width: 22rem; min-height: 44px; }
.filters { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.filters a { display: inline-flex; align-items: center; gap: var(--s-1); min-height: 44px; padding: 0 var(--s-4); border-radius: var(--r-pill); text-decoration: none; border: 1px solid var(--line-strong); background: var(--paper); font: 600 var(--text-hint) var(--sans); color: var(--plum); }
.filters a[aria-current='page'] { background: var(--plum); color: #fff; border-color: var(--plum); }

details.writer { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: var(--s-2); }
details.writer > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(10rem, 1.3fr) minmax(8rem, 1fr); margin-right: 15rem; gap: var(--s-2) var(--s-4); align-items: center; padding: var(--s-3) var(--s-4); min-height: 56px; }
details.writer > summary::-webkit-details-marker { display: none; }
details.writer .who { font-weight: 700; color: var(--plum); }
details.writer .where { color: var(--ink-2); font-size: var(--text-hint); font-weight: 400; }
details.writer .mini { display: flex; align-items: center; gap: var(--s-2); font-size: var(--text-hint); color: var(--ink-2); }
details.writer .mini .bar { flex: 0 0 5rem; height: 8px; background: #e2e6ea; border-radius: var(--r-pill); overflow: hidden; }
details.writer .mini .bar span { display: block; height: 100%; background: var(--mulberry); }
details.writer .writer-actions { display: flex; gap: var(--s-2); align-items: center; justify-content: flex-end; flex-wrap: wrap; }
details.writer .writer-cards { list-style: none; margin: 0; padding: 0 var(--s-4) var(--s-3); }
details.writer .writer-cards li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); padding: var(--s-2) 0; border-top: 1px solid var(--line); }
details.writer .writer-cards .to { flex: 1 1 12rem; }
@media (max-width: 40em) { details.writer > summary { grid-template-columns: 1fr; margin-right: 0; } details.writer .writer-actions { justify-content: flex-start; } }

.person-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-4); display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-1) var(--s-4); align-items: center; margin-bottom: var(--s-2); }
.person-card .pick { grid-row: 1 / span 2; }
.person-card .pick input { width: 24px; height: 24px; accent-color: var(--mulberry); }
.person-card .fb { font: 700 1.125rem/1.3 var(--heading); color: var(--plum); display: inline-flex; align-items: center; min-height: 44px; }
.person-card .meta { color: var(--ink-2); font-size: var(--text-hint); }
.person-card .person-actions { grid-column: 3; grid-row: 1 / span 2; display: flex; gap: var(--s-2); flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 40em) { .person-card { grid-template-columns: auto 1fr; } .person-card .person-actions { grid-column: 1 / -1; grid-row: auto; justify-content: stretch; } .person-card .person-actions > * { flex: 1; } }
.sticky-bar { position: sticky; bottom: calc(var(--s-3) + var(--tabbar-h)); z-index: 6; display: flex; gap: var(--s-3); align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--plum); color: #fff; border-radius: var(--r-md); padding: var(--s-3) var(--s-4); box-shadow: var(--e2); margin-top: var(--s-4); }
.sticky-bar label { display: flex; gap: var(--s-2); align-items: center; font-weight: 600; }
.sticky-bar input { width: 22px; height: 22px; accent-color: var(--blush); }
.sticky-bar .btn { background: var(--blush); border-color: var(--blush); color: var(--plum); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-hint); font-variant-numeric: tabular-nums; }
.table caption { text-align: left; color: var(--ink-2); padding-bottom: var(--s-2); }
.table th { text-align: left; font-weight: 700; color: var(--ink-2); border-bottom: 2px solid var(--line); padding: var(--s-2); white-space: nowrap; font-size: var(--text-caption); }
.table td { border-bottom: 1px solid var(--line); padding: var(--s-2); vertical-align: top; }
.table tbody th { border-bottom: 1px solid var(--line); white-space: normal; font-size: inherit; color: var(--ink); vertical-align: top; }
.table .num { text-align: right; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); margin: 0 0 var(--s-4); }
@media (max-width: 40em) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { background: var(--sunken); border-radius: var(--r-sm); padding: var(--s-3) var(--s-4); }
.stat-n { font: 900 2.25rem/1.1 var(--heading); color: var(--mulberry); letter-spacing: -.02em; }
.stat-label { color: var(--ink-2); font-size: var(--text-hint); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip { display: inline-flex; align-items: center; gap: 2px; background: var(--orchid-100); border-radius: var(--r-pill); padding-left: var(--s-3); font-size: var(--text-hint); min-height: 44px; }
.chip-elf { background: var(--candle-soft); }
.chip button { border: 0; background: transparent; cursor: pointer; min-width: 44px; min-height: 44px; border-radius: var(--r-pill); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; }
@media (hover: hover) { .chip button:hover { color: var(--danger); background: rgba(0, 0, 0, .06); } }
.match-row { padding: var(--s-3) 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(10rem, 14rem) 1fr; gap: var(--s-2) var(--s-4); }
.match-row .who { font-weight: 700; color: var(--plum); }
@media (max-width: 40em) { .match-row { grid-template-columns: 1fr; } }
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { padding: var(--s-3) 0; border-top: 1px solid var(--line); }
.plain-list li:first-child { border-top: 0; }
.more-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); gap: var(--s-3); }
.more-grid a { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: var(--ink); }
.more-grid a strong { display: block; color: var(--plum); }
.more-grid .icon { color: var(--mulberry); width: 1.5em; height: 1.5em; }
@media (hover: hover) { .more-grid a:hover { border-color: var(--mulberry); } }

/* Shareable season card (square at any width) */
.share-wrap { container-type: inline-size; max-width: 540px; margin: 0 auto var(--s-4); }
.share-card {
  aspect-ratio: 1 / 1; border-radius: 4cqi; padding: 7cqi; color: #fff; text-align: center;
  background: var(--sunset-glow), var(--sunset);
  display: flex; flex-direction: column; justify-content: space-between; align-items: center; box-shadow: var(--e2);
}
.share-card .share-logo { width: 42cqi; height: auto; }
.share-card .eyebrow { color: var(--blush); font-size: 3.2cqi; margin: 1cqi 0 0; }
.share-card .big { font: 900 19cqi/1 var(--heading); letter-spacing: -.02em; color: #fff; margin: 0; }
.share-card .big-label { font: 700 4.6cqi/1.25 var(--heading); margin: 1cqi 0 0; }
.share-card .trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3cqi; width: 100%; }
.share-card .trio b { display: block; font: 900 7.5cqi/1.1 var(--heading); }
.share-card .trio span { font: 700 2.6cqi/1.3 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--blush); }
.share-card .remembered { font: 700 3.6cqi/1.3 var(--heading); display: flex; gap: 2cqi; align-items: center; justify-content: center; }
.share-card .remembered .icon { color: var(--candle-glow); width: 5cqi; height: 5cqi; }
.share-card .foot { font: 900 3.2cqi/1.2 var(--heading); letter-spacing: .08em; text-transform: uppercase; }
.share-card .foot small { display: block; font: 600 2.6cqi var(--sans); letter-spacing: 0; text-transform: none; opacity: .75; margin-top: 1cqi; }

.outbox-item h3 { margin: var(--s-1) 0 var(--s-2); }
.chan { display: inline-block; padding: 1px 8px; border-radius: 6px; font-weight: 700; text-transform: uppercase; font-size: .75rem; background: #eef0f2; }
.chan-sms { background: var(--blush); }
.chan-push { background: var(--ok-soft); }

/* -------------------------------------------------------------------------- Dialog (confirm) */
dialog.confirm { border: 0; border-radius: var(--r-lg); padding: var(--s-5); max-width: min(30rem, calc(100vw - 2rem)); box-shadow: var(--e2); color: var(--ink); }
dialog.confirm::backdrop { background: rgba(46, 36, 61, .55); }
dialog.confirm h2 { font-size: var(--text-h3); }
dialog.confirm .actions { margin-top: var(--s-5); }

.option-hint { display: block; color: var(--ink-2); font-size: var(--text-hint); font-weight: 400; line-height: 1.45; margin-top: 2px; }

/* Print links under My Cards */
.print-links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); align-items: center; }
.print-links a, .print-links .linklike { display: inline-flex; gap: var(--s-2); align-items: center; }

/* -------------------------------------------------------------------------- Writing Tips */
.tips h3 { font-size: var(--text-h3); margin: var(--s-5) 0 var(--s-2); }
.tips .card > h3:first-of-type { margin-top: var(--s-4); }
.tip-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.tip-toc a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-4); border-radius: var(--r-pill); background: var(--paper); border: 1px solid var(--line-strong); color: var(--plum); font-weight: 600; text-decoration: none; }
@media (hover: hover) { .tip-toc a:hover { border-color: var(--mulberry); } }
.tip-label { font: 700 var(--text-caption)/1.3 var(--heading); letter-spacing: .1em; text-transform: uppercase; color: var(--mulberry); margin: var(--s-4) 0 var(--s-2); }
.tip-examples { list-style: none; margin: 0 0 var(--s-4); padding: 0; }
.tip-examples li { margin: 0 0 var(--s-2); }
.tip-examples blockquote.note-quote { margin: 0; }
.tip-template { margin: 0 0 var(--s-4); padding: var(--s-4) var(--s-5); background: var(--candle-soft); border: 1px dashed #d9b77a; border-radius: var(--r-md); font: 1.125rem/1.6 var(--quote); }
.tip-template p { margin: 0 0 var(--s-2); }
.tip-template p:last-child { margin: 0; }
.tip-avoid { margin: 0 0 var(--s-4); display: grid; gap: var(--s-3); }
.tip-avoid > div { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.tip-avoid dt, .tip-avoid dd { margin: 0; padding: var(--s-3) var(--s-4); }
.tip-avoid dt { background: #f4f5f7; color: var(--ink-2); }
.tip-avoid dd { background: var(--orchid-50); border-top: 1px solid var(--line); color: var(--ink); }
.tip-avoid .tip-tag { display: block; font: 700 var(--text-caption)/1.3 var(--heading); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 2px; }
.tip-avoid dt .tip-tag { color: var(--ink-2); }
.tip-avoid dd .tip-tag { color: var(--mulberry); }

/* -------------------------------------------------------------------------- Danger zone (delete everything) */
.card.danger-zone { border-color: var(--danger-line); background: linear-gradient(var(--danger-soft), var(--danger-soft)) top / 100% 6px no-repeat, var(--paper); }
.card.danger-zone h2 { color: var(--danger-text); }

/* -------------------------------------------------------------------------- Error pages */
.error-state { text-align: center; padding: var(--s-7) var(--s-4); }
.error-state .mark { width: 4rem; height: 4.5rem; color: var(--orchid); --heart: var(--blush); display: block; margin: 0 auto var(--s-4); }

/* -------------------------------------------------------------------------- Motion & print */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  @page { margin: 0; } /* paper size is the printer's (Letter or A4); the labels page sets its sheet; other pages pad themselves */
  body:not(.bare) main.wrap { padding: .5in !important; }
  html, body { background: #fff; }
  .site-header, .site-footer, .tabbar, .no-print, .actions, .help, .skip-link, .flash { display: none !important; }
  main.wrap { padding: 0; max-width: none; }
  .card, details.person, .rows { box-shadow: none; break-inside: avoid; }
  details.person > summary .chev { display: none; }
  body.bare { margin: 0; }
  body.bare main.wrap { padding: 0; margin: 0; max-width: none; overflow: visible; }
  .label-sheet { margin: 0; box-shadow: none; break-after: page; }
  .label-sheet:last-child { break-after: auto; }
  .label { outline: none; }
}

/* -------------------------------------------------------------------------- Long admin lists */
.search-box { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; margin: 0 0 var(--s-3); }
.search-box input[type='search'] { flex: 1 1 14rem; min-width: 0; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); margin: var(--s-3) 0 var(--s-4); }
.disclosure summary .summary-h { display: inline; font-size: inherit; line-height: inherit; margin: 0; color: inherit; }
/* Writer rows: the Remind button sits beside (not inside) the expandable summary */
.writer-wrap { position: relative; }
.writer-wrap > details.writer { margin-bottom: var(--s-2); }
.writer-wrap > .writer-actions { position: absolute; top: var(--s-3); right: var(--s-4); display: flex; gap: var(--s-2); align-items: center; }
@media (max-width: 40em) { .writer-wrap > details.writer > summary { padding-bottom: var(--s-1); } .writer-wrap > .writer-actions { position: static; padding: 0 var(--s-4) var(--s-3); } }
li.more a { font-weight: 600; display: inline-flex; align-items: center; gap: var(--s-1); min-height: 44px; }
/* Short or narrow screens: the admin toolbar scrolls with the page instead of covering it */
@media (max-height: 640px), (max-width: 40em) { .toolbar { position: static; max-height: none; overflow: visible; } html:has(.toolbar) { scroll-padding-top: var(--s-4); } }
/* Very narrow screens (a folded phone, or zoomed in): grids and rows give way rather than spill */
@media (max-width: 22em) {
  .person-card { grid-template-columns: auto 1fr; }
  .person-card .person-actions { grid-column: 1 / -1; grid-row: auto; justify-content: flex-start; }
  .stat-grid { grid-template-columns: 1fr; }
  .inline-form .field, .inline-form select { min-width: 0; width: 100%; }
}
/* Stand-alone links get a full-size tap area (links inside sentences stay as they are) */
.print-links a, .card p.center > a, .table a, .help-list .help-note a { display: inline-flex; align-items: center; min-height: 44px; }
.help-list a > span, .help-list button > span { min-width: 0; overflow-wrap: break-word; }
@media (max-width: 22em) {
  .brand { flex-wrap: wrap; gap: var(--s-1) var(--s-3); }
  .brand-sub { border-left: 0; padding-left: 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
/* Never wider than the screen: long names, emails, addresses and dropdown choices wrap or shrink */
input, select, textarea { max-width: 100%; }
input[type='date'] { min-width: 0; }
.person-body > *, .about, .envelope, .prefs li, .rows li > * { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 40em) { .inline-form .field, .inline-form select { width: 100%; } }

/* ---------------------------------------------------------------- From the 100-person visual review */
/* Footer sits at the bottom of the window on short pages (no plum band on big screens) */
body:not(.bare) { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body:not(.bare) > main { flex: 1 0 auto; width: 100%; box-sizing: border-box; }
/* Places the page moves you to (after "I mailed this card") don't get a box drawn round them */
[tabindex='-1']:focus { outline: none; }
/* The logo grows with the text instead of shrinking beside it */
.brand-logo { height: 3.5rem; }
@media (max-width: 40em) { .brand-logo { height: 2.75rem; } }
/* Mid-width screens and phones held sideways: one compact header row */
@media (min-width: 40.01em) and (max-width: 64em) {
  .brand-sub { display: none; }
  .site-header.member .nav .full { display: none; }
  .site-header.member .nav .short { display: inline; }
}
@media (max-height: 500px) {
  .header-inner { padding-block: var(--s-1); }
  .brand-logo { height: 2.25rem; }
  .brand-sub { display: none; }
  .nav a { min-height: 44px; }
  .nav .icon { display: none; }
  .tree-scene { padding-top: var(--s-4); }
  .tree-scene .mark { width: 2.5rem; height: auto; margin-bottom: var(--s-2); }
}
/* Larger text on a phone (the screen is narrow measured in letters): the menu wraps, no icons */
@media (max-width: 19em) {
  .nav { flex-wrap: wrap; row-gap: 2px; }
  .nav a { flex: 1 1 30%; min-height: 44px; }
  .nav .icon { display: none; }
}
/* Admin tabs on phones: two even rows */
@media (max-width: 40em) {
  .admin-nav a { flex: 1 1 30%; justify-content: center; padding-inline: var(--s-2); }
}
/* Card lists: each writer's row is one card, with its Remind button inside */
.writer-wrap { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: var(--s-2); }
.writer-wrap > details.writer { border: 0; margin: 0; background: transparent; }
/* Fields only as wide as what goes in them */
input[type='number'] { max-width: 8rem; }
input[type='tel'] { max-width: 20rem; }
/* Label sheets fit the screen as a preview (printing is unaffected) */
@media screen and (max-width: 880px) { .label-sheet { zoom: .85; } }
@media screen and (max-width: 720px) { .label-sheet { zoom: .45; } }
/* Writing Tips: the contents list is one swipeable row on phones */
@media (max-width: 40em) {
  .tip-toc ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .tip-toc ul::-webkit-scrollbar { display: none; }
  .tip-toc a { white-space: nowrap; }
}
/* My details: the Save button stays in reach while scrolling a long form */
.sticky-save { position: sticky; bottom: calc(var(--s-3) + var(--tabbar-h, 0px)); z-index: 5; background: var(--paper); padding: var(--s-3); margin: var(--s-4) calc(-1 * min(var(--s-3), var(--gutter))) 0; border-radius: var(--r-md); box-shadow: var(--e2); }
/* …and a field you move to (Tab, or a link in the error list) stops above it, not underneath */
html:has(.sticky-save) { scroll-padding-bottom: calc(6rem + var(--tabbar-h, 0px)); }
/* Windows high contrast (forced colours): keep the brand areas, and show what's selected */
@media (forced-colors: active) {
  .site-header, .tabbar, .tree-scene, .hero, .share-card, .site-footer { forced-color-adjust: none; }
  .progress, .bar { border: 1px solid CanvasText; }
  .progress span, .bar span { forced-color-adjust: none; background: Highlight; }
  .choice-pills label:has(input:checked) { outline: 3px solid Highlight; outline-offset: 2px; }
  .admin-nav a[aria-current='page'], .filters a[aria-current='page'] { outline: 3px solid Highlight; outline-offset: 2px; }
  .badge, .card, details.person, .writer-wrap { border: 1px solid CanvasText; }
}
/* Very narrow (in letters): the message after an action uses the full width */
@media (max-width: 19em) { .flash .icon { display: none; } .site-header.public .nav a { padding-inline: var(--s-2); } }
/* Badges that wrap become rounded rectangles, not ovals */
.badge { border-radius: .9em; }
/* Error list: each link a comfortable tap, long messages wrap */
.error-summary li a { display: flex; align-items: center; min-height: 44px; padding: .2em 0; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- From the Safari (WebKit) run */
/* Very large text that the layout switches don't see (iPhone Safari's own text size): the wordmark
   moves under the logo instead of running off the screen */
.brand { flex-wrap: wrap; max-width: 100%; row-gap: var(--s-1); }
/* …a word too long for the line (a web address) wraps instead of pushing the page sideways */
main { overflow-wrap: break-word; }
/* …and the phone menu wraps into rows, as it does above when the screen is narrow in letters. The
   header measures itself here, so this also works when only the page's text size has grown. */
.header-inner { container-type: inline-size; }
@container (max-width: 17rem) {
  .nav { flex-wrap: wrap; row-gap: 2px; }
  .nav a { flex: 1 1 30%; min-height: 44px; }
  .nav .icon { display: none; }
}
