/* Engagements (engagements.js, 28 Oct 2026). On app.css's tokens; nothing new
   in the palette except the confetti, which lives on a canvas. The
   celebration card wears the engaged couple's own colour, --card-celebrated
   (case 24's "super pale lavender"), so it reads as the same good news the
   roster already marks. */

/* ---------- Faces ---------- */

.eng-faces { display: inline-flex; align-items: center; flex: none; }
.eng-faces > .avatar { border: 2px solid var(--card); box-sizing: content-box; }
.eng-faces > .avatar + .avatar { margin-left: -10px; }
.avatar.eng-face.sm { width: 34px; height: 34px; font-size: 12px; }
.avatar.eng-face.big { width: 54px; height: 54px; font-size: 17px; }
.avatar.eng-face.xl { width: 112px; height: 112px; font-size: 34px; }
.eng-faces.xl > .avatar { border-width: 4px; box-shadow: 0 10px 24px -14px rgba(24, 20, 26, .55); }
.eng-faces.xl > .avatar + .avatar { margin-left: -16px; }
.eng-faces.big > .avatar + .avatar { margin-left: -12px; }
.eng-faces.lg > .avatar + .avatar { margin-left: -14px; }
.eng-faces.lg > .avatar { border-width: 3px; }

/* ---------- The celebration ---------- */

.eng-veil {
  position: fixed; inset: 0; z-index: 70;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(24, 16, 26, .72);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: eng-fade .25s ease-out;
}
.eng-confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.eng-card {
  position: relative; width: min(440px, 100%);
  max-height: calc(100dvh - 32px); overflow-y: auto;
  background: var(--card-celebrated); border: 1px solid var(--line-celebrated);
  border-radius: 28px; padding: 34px 28px 22px; text-align: center;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6);
  animation: eng-pop .42s cubic-bezier(.2, 1.3, .4, 1) both;
}
.eng-card.turn { animation: eng-turn .3s ease-out both; }
@keyframes eng-fade { from { opacity: 0 } }
@keyframes eng-pop { from { opacity: 0; transform: scale(.9) translateY(10px) } }
@keyframes eng-turn { from { opacity: .3; transform: translateY(6px) } }
.eng-veil.still, .eng-veil.still .eng-card { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .eng-veil, .eng-card, .eng-card.turn { animation: none; }
}

.eng-x {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink-2);
}
.eng-x:hover { background: var(--fill); }
.eng-kicker {
  font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
}
.eng-mabrook {
  font-family: "Cormorant Garamond", Georgia, serif; font-weight: 700;
  font-size: 58px; line-height: 1; letter-spacing: -.01em;
  color: var(--accent); margin: 6px 0 22px;
}
.eng-card .eng-faces { position: relative; }
.eng-ring {
  position: relative; z-index: 1; flex: none;
  width: 36px; height: 36px; margin: 0 -18px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: #fff; border: 3px solid var(--card-celebrated);
}
.eng-faces.xl > .eng-ring + .avatar { margin-left: 0; }
.eng-names {
  font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600;
  font-size: 28px; line-height: 1.15; margin: 18px 0 8px; overflow-wrap: anywhere;
}
.eng-mm { font-size: 15px; color: var(--ink); font-weight: 500; }
.eng-date { font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.eng-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }
.eng-step {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--line-celebrated); color: var(--accent);
}
.eng-step:disabled { opacity: .35; cursor: default; }
.eng-count { font-size: 14px; font-weight: 600; color: var(--ink-2); min-width: 56px; font-variant-numeric: tabular-nums; }
.eng-ok { margin-top: 22px; font-size: 16px; }
.eng-all { margin-top: 8px; background: none; color: var(--accent); }
.eng-all:hover { background: var(--card); }

@media (prefers-color-scheme: dark) {
  .eng-veil { background: rgba(6, 4, 8, .78); }
  .eng-ring { color: #1a1520; }
}

@media (max-width: 480px) {
  .eng-card { padding: 30px 18px 16px; border-radius: 24px; }
  .eng-mabrook { font-size: 48px; margin-bottom: 18px; }
  .avatar.eng-face.xl { width: 96px; height: 96px; font-size: 30px; }
  .eng-names { font-size: 25px; }
}

/* ---------- Home ---------- */

.eng-slot:empty, .eng-block:empty, .eng-slot > div:empty { display: none; }
.eng-slot > div { margin: 0 0 18px; }
.eng-todo {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 16px 18px; border-radius: 22px; text-align: left;
  background: var(--accent); color: #fff; box-shadow: var(--shadow);
}
.eng-todo:hover { filter: brightness(1.05); }
.eng-todo .grow { flex: 1; min-width: 0; }
.eng-todo .title { font-size: 19px; font-weight: 600; }
.eng-todo .meta { font-size: 14px; color: rgba(255, 255, 255, .9); margin-top: 2px; overflow-wrap: anywhere; }
.eng-todo-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .18);
}
@media (prefers-color-scheme: dark) {
  /* The dark accent is a pale plum; white text on it would not read. */
  .eng-todo { color: #1a1520; }
  .eng-todo .meta { color: rgba(26, 21, 32, .85); }
  .eng-todo-icon { background: rgba(26, 21, 32, .12); }
}

/* ---------- Lists ---------- */

@media (max-width: 600px) {
  .eng-head.screen-head { flex-wrap: wrap; gap: 10px; }
  .eng-head .head-actions { flex-wrap: wrap; }
}
.eng-no {
  flex: none; font-weight: 700; color: var(--accent);
  font-variant-numeric: tabular-nums; font-size: 15px;
}
.eng-no.lead { min-width: 46px; }
.eng-row .title, .eng-srow .title, .eng-latest .title { overflow-wrap: anywhere; }
.eng-hist { flex: none; }
@media (max-width: 520px) {
  .eng-hist { display: none; }
  .eng-srow { gap: 10px; }
  .eng-no.lead { min-width: 38px; font-size: 14px; }
}

/* ---------- To announce ---------- */

.eng-pending + .eng-pending { margin-top: 14px; }
.eng-pending-top { display: flex; align-items: center; gap: 16px; }
.eng-pending-top .grow { flex: 1; min-width: 0; }
.eng-pending-names { font-size: 18px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.eng-pending .meta { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.eng-notes {
  margin: 14px 0 0; padding: 10px 12px; border-radius: var(--r-xs);
  background: var(--fill); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere;
}
.eng-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.eng-actions .btn.ghost { padding: 13px 6px; }
@media (max-width: 480px) {
  .eng-pending-top { align-items: flex-start; }
  .eng-actions .btn.primary { flex: 1 1 100%; }
}

/* ---------- Stats ---------- */

.eng-stats-bar { display: grid; gap: 10px; margin-bottom: 4px; }
.eng-search.search { margin: 0; }
/* Three across on a monitor, two on a phone: six side by side cut every
   label short. */
.eng-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 700px) { .eng-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.eng-filters select {
  width: 100%; min-width: 0; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--fill); color: var(--ink); font-size: 14px;
}
.eng-filters select:focus { outline: none; border-color: var(--accent); }
.eng-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.eng-count-line { margin: 12px 0 10px; }

/* ---------- Sheets ---------- */

.eng-detail-top { text-align: center; margin-bottom: 16px; }
.eng-kv .row { gap: 12px; }
.eng-kv .row:hover { background: none; }
/* The label keeps its width; a long value wraps under itself rather than
   running over the label. */
.eng-kv .row .grow { flex: 0 0 auto; }
.eng-kv-v { flex: 1 1 auto; font-weight: 500; font-size: 14px; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.eng-form .field { margin-bottom: 6px; }
.eng-form .field + .field, .eng-link + .field { margin-top: 12px; }
.eng-link { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; min-height: 26px; }
.eng-link .meta { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); font-size: 13px; }
.eng-link .link-btn { font-size: 13px; }
.eng-error { color: var(--stop); font-size: 14px; margin: 0 0 12px; }

/* ---------- The couple's photo (Sam, 28 Oct, later) ---------- */

.eng-couple-thumb {
  position: relative; flex: none; overflow: hidden; border-radius: 10px;
  background: var(--accent-soft); width: 66px; height: 38px;
}
.eng-couple-thumb.big { width: 84px; height: 58px; border-radius: 12px; }
.eng-couple-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.eng-hero {
  position: relative; width: 100%; aspect-ratio: 4 / 3; max-height: 300px;
  border-radius: 20px; overflow: hidden; background: var(--accent-soft);
  border: 4px solid var(--card); box-shadow: 0 14px 30px -18px rgba(24, 20, 26, .6);
}
.eng-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.eng-detail-top .eng-hero { margin: 0 auto; }

.eng-ig { flex: none; }
.eng-ig.yes { background: var(--ok-soft); color: var(--ok); }
.eng-ig.asking { background: var(--wait-soft); color: var(--wait); }
.eng-badges { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 520px) { .eng-srow .eng-ig { display: none; } }

/* The ask */
.eng-ask-top { text-align: center; margin: 2px 0 6px; }
.eng-ask-names {
  font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600;
  font-size: 26px; line-height: 1.15; margin-top: 4px; overflow-wrap: anywhere;
}
.eng-ask-part { border-top: 1px solid var(--line); padding: 16px 0 6px; margin-top: 12px; }
.eng-ask-q { font-size: 16px; font-weight: 600; margin: 0 0 10px; letter-spacing: -.01em; }
.eng-ask-help { font-size: 13.5px; color: var(--ink-2); margin: -4px 0 12px; }
.eng-ask-row { display: flex; flex-wrap: wrap; gap: 10px; }
.eng-ask-photo {
  position: relative; width: 100%; aspect-ratio: 4 / 3; max-height: 320px; margin-bottom: 12px;
  border-radius: 16px; overflow: hidden; background: var(--fill);
}
.eng-ask-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.eng-ask-photo.waiting { display: grid; place-items: center; color: var(--ink-2); font-size: 14px; aspect-ratio: 16 / 7; }
.eng-ask-said { display: flex; align-items: center; gap: 4px; margin: 0 0 4px; color: var(--ok); font-weight: 500; font-size: 14.5px; }
.eng-ask-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.eng-choice {
  padding: 12px 6px; border-radius: var(--r-sm); background: var(--fill);
  border: 1.5px solid var(--line); color: var(--ink); font-size: 14.5px; font-weight: 500;
}
.eng-choice:hover { border-color: var(--accent); }
.eng-choice[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
@media (prefers-color-scheme: dark) { .eng-choice[aria-pressed="true"] { color: #1a1520; } }
.eng-ask-note { margin-bottom: 4px; }
.eng-ask-foot { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 12px; }
.eng-ask-snoozed { display: flex; align-items: center; gap: 4px; justify-content: center; font-size: 13.5px; color: var(--ink-2); margin: 0 0 10px; }
.eng-ask-later { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.eng-ask-later .btn { padding: 11px 10px; font-size: 14px; }
.eng-ask-later .btn.ghost { grid-column: 1 / -1; padding: 8px 0; justify-self: center; }
.eng-ask-foot .eng-ask-help { margin: 4px 0 0; }

/* Home: the asks waiting on me */
.eng-asks { overflow: hidden; }
.eng-asks-head { display: flex; align-items: center; gap: 12px; padding: 14px var(--row-x) 12px; border-bottom: 1px solid var(--line); }
.eng-asks-head .grow { flex: 1; min-width: 0; }
.eng-asks-head .title { font-weight: 600; }
.eng-asks-head .meta { font-size: 13px; color: var(--ink-2); }
.eng-asks-icon {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
}
.eng-ask-line:hover { background: none; }
.eng-ask-line .title { overflow-wrap: anywhere; }
.eng-ask-more .title { font-size: 14px; color: var(--accent); font-weight: 600; }

/* The marked-engaged moment */
.eng-moment-hint { text-align: center; font-size: 13px; color: var(--ink-2); margin: 10px 0 0; }

/* ---------- Stats, case 689: the list to show a donor ----------
   Kim, 16 November: the total large at the top, both faces large and side by
   side (the couple's own photo when there is one), the number above the
   names, matchmaker and date small underneath, quiet dividers. */

.eng-total-bar { display: flex; align-items: center; gap: 18px; margin: 4px 0 16px; flex-wrap: wrap; }
.eng-total { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.eng-total-n {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 600; font-size: 64px; line-height: .9; color: var(--accent);
  font-variant-numeric: lining-nums; letter-spacing: -.01em;
}
.eng-total-w {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 500; font-size: 34px; line-height: 1; color: var(--ink);
}
.eng-total-rule { width: 1px; align-self: stretch; min-height: 40px; background: var(--line); }
.btn.eng-export { color: var(--accent); font-weight: 600; }

.eng-list2 { margin-top: 6px; }
.eng-srow2 {
  display: flex; align-items: center; gap: 18px; width: 100%;
  padding: 16px 4px; background: none; border: 0; text-align: left;
  color: inherit; font: inherit; cursor: pointer; position: relative;
}
/* A hairline that starts where the words do, in the brand's own colour. */
.eng-srow2 + .eng-srow2::before {
  content: ""; position: absolute; top: 0; right: 0; left: 4px;
  height: 1px; background: color-mix(in srgb, var(--accent) 16%, transparent);
}
.eng-srow2:hover .eng-srow2-names { color: var(--accent); }
.eng-srow2:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.eng-srow2 .chev { margin-left: auto; color: var(--ink-3); flex: none; }

.avatar.eng-face.list { width: 72px; height: 72px; font-size: 22px; border-radius: 50%; }
.avatar.eng-face.list img { border-radius: 50%; object-position: 50% 22%; }
.eng-faces.list > .avatar {
  border: 3px solid var(--card);
  box-shadow: 0 6px 14px -8px rgba(24, 20, 26, .45);
}
.eng-faces.list > .avatar + .avatar { margin-left: -14px; }
/* The couple's own photo takes the pair's footprint, so rows still line up. */
.eng-couple-thumb.list {
  width: 142px; height: 78px; border-radius: 16px; box-sizing: border-box;
  border: 3px solid var(--card); box-shadow: 0 6px 14px -8px rgba(24, 20, 26, .45);
}

.eng-srow2-text { min-width: 0; flex: 1 1 auto; }
.eng-srow2-no {
  font-size: 13px; font-weight: 700; color: var(--accent);
  letter-spacing: .02em; font-variant-numeric: tabular-nums;
}
.eng-srow2-names {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 600; font-size: 26px; line-height: 1.12; color: var(--ink);
  margin-top: 2px; overflow-wrap: anywhere;
}
.eng-srow2-meta { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.eng-srow2-ig { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }

@media (max-width: 520px) {
  .eng-total-n { font-size: 52px; }
  .eng-total-w { font-size: 28px; }
  .eng-total-bar { gap: 12px; }
  .eng-total-rule { display: none; }
  .eng-total-bar .eng-export { margin-left: auto; }
  .eng-srow2 { gap: 14px; padding: 14px 2px; }
  .avatar.eng-face.list { width: 58px; height: 58px; font-size: 18px; }
  .eng-faces.list > .avatar + .avatar { margin-left: -12px; }
  .eng-couple-thumb.list { width: 116px; height: 64px; }
  .eng-srow2-names { font-size: 21px; }
  .eng-srow2-meta { font-size: 13px; }
  .eng-srow2 .chev { display: none; }
}

/* Waiting for confirmation (Kim, 17 Nov): marked engaged, no number yet. Admins only. */
.eng-wait {
  background: var(--card); border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 16px; padding: 14px 16px 6px; margin: 0 0 18px;
}
.eng-wait-title { font-weight: 600; font-size: 15px; color: var(--accent); }
.eng-wait-hint { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.eng-wait-list { margin-top: 8px; }
.eng-wait-row {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 0;
  background: none; border: 0; border-top: 1px solid color-mix(in srgb, var(--accent) 14%, transparent);
  text-align: left; font: inherit; color: inherit;
}
button.eng-wait-row { cursor: pointer; }
.eng-wait-row .grow { flex: 1; min-width: 0; }
.eng-wait-names { font-weight: 600; font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }
.eng-wait-pill {
  flex: none; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
}
