/* ============================================================
   editor.css — THE EDITOR's one look.

   The single add/edit surface (editor.js) — an overlay sheet that
   floats above whatever page summoned it. Styles translated from
   the approved editor-mock (Jul 2026).

   Expects host palette vars: --paper --card --ink --ink-2 --ink-3
   --line --accent --accent-soft (+ optional --blood, --gold).
   Falls back to the warm-paper defaults.
   ============================================================ */

.ed-backdrop {
  position: fixed; inset: 0; z-index: 1300;
  background: rgba(40, 30, 18, 0.45);
  display: none;
  overflow-y: auto;
  padding: 26px 14px 60px;
}
.ed-backdrop.open { display: block; }

.ed-sheet {
  max-width: 680px; margin: 0 auto;
  background: var(--paper, #f5f0e6);
  color: var(--ink, #2c2a26);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(20, 15, 8, 0.45);
  overflow: hidden;
  font-family: 'Lora', Georgia, serif;
  position: relative; /* anchor for the ✦ Guide me helper panel */
}

.ed-hd {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 24px;
  background: var(--card, #fffdf8);
  border-bottom: 1px solid var(--line, #cabfad);
}
.ed-hd .ed-ph {
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  background: var(--accent-soft, #f6e9e4); color: var(--accent, #7a2e25);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  overflow: hidden;
}
.ed-hd .ed-ph img { width: 100%; height: 100%; object-fit: cover; }
/* Discreet ✦ — this portrait was AI-enhanced (the original is kept). */
.ed-hd .ed-ph .ed-ph-ai { position: absolute; top: -2px; right: -2px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent, #7a2e25); color: #fff; font-size: 9px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--card, #fffdf8); }
.ed-hd .ed-t { flex: 1; min-width: 0; }
.ed-hd .ed-t b { font-size: 17px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-hd .ed-t small { display: block; font-size: 11px; color: var(--ink-3, #9a9184); letter-spacing: .14em; }
.ed-hd .ed-x { font-size: 22px; color: var(--ink-3, #9a9184); background: none; border: none; cursor: pointer; padding: 4px 8px; }
.ed-hd .ed-x:hover { color: var(--accent, #7a2e25); }

.ed-tabs { display: flex; gap: 6px; padding: 12px 24px 0; flex-wrap: wrap; }
.ed-tab {
  font: inherit; font-size: 12px;
  border: 1px solid var(--line, #cabfad); border-bottom: none;
  background: var(--paper, #f5f0e6);
  border-radius: 10px 10px 0 0;
  padding: 7px 14px; color: var(--ink-2, #6b6459); cursor: pointer;
}
.ed-tab.on { background: var(--card, #fffdf8); color: var(--accent, #7a2e25); font-weight: 600; }
.ed-tab-remove { margin-left: auto; color: #a24a34; border-color: #e0c4ba; }
.ed-tab-remove.on { color: #a24a34; }

.ed-pane { display: none; padding: 10px 24px 24px; }
.ed-pane.on { display: block; }

.ed-sect { margin-top: 20px; }
.ed-sect > .ed-shd {
  font-size: 10.5px; letter-spacing: .2em; font-weight: 600;
  color: var(--blood, #a3472d); margin-bottom: 10px;
}
.ed-sect > .ed-shd small { letter-spacing: 0; font-weight: 400; text-transform: none; color: var(--ink-3, #9a9184); }

.ed-frow { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ed-fld { flex: 1; min-width: 140px; }
.ed-fld label {
  display: block; font-size: 10px; letter-spacing: .12em;
  color: var(--ink-3, #9a9184); text-transform: uppercase; margin-bottom: 4px;
}
.ed-fld input {
  width: 100%; font: inherit; font-size: 14px;
  border: 1px solid var(--line, #cabfad); border-radius: 10px;
  padding: 9px 12px; background: var(--card, #fffdf8); color: var(--ink, #2c2a26);
  box-sizing: border-box;
}
.ed-fld input:focus { outline: none; border-color: var(--accent, #7a2e25); box-shadow: 0 0 0 3px var(--accent-soft, #f6e9e4); }
/* The note boxes. A <textarea> is a different species from an <input> and
   inherits NOTHING by default — undressed, it renders in the browser's
   1990s monospace at doll-house size with a resize grip (Kaye, Aug 13:
   "genuinely, why?"). Same costume as every other box, room for a real
   thought, and no grip lines. */
.ed-fld textarea {
  width: 100%; font: inherit; font-size: 14px; line-height: 1.55;
  border: 1px solid var(--line, #cabfad); border-radius: 10px;
  padding: 9px 12px; background: var(--card, #fffdf8); color: var(--ink, #2c2a26);
  box-sizing: border-box; min-height: 76px; resize: none;
}
.ed-fld textarea:focus { outline: none; border-color: var(--accent, #7a2e25); box-shadow: 0 0 0 3px var(--accent-soft, #f6e9e4); }
.ed-fld textarea::placeholder { font-style: italic; color: var(--ink-3, #9a9184); }

.ed-preview {
  font-size: 13px; color: var(--ink-2, #6b6459); font-style: italic;
  background: var(--accent-soft, #f6e9e4); border-radius: 10px; padding: 9px 14px;
}
.ed-preview b { color: var(--accent, #7a2e25); font-style: normal; }

.ed-seg { display: flex; gap: 5px; flex-wrap: wrap; }
.ed-seg button {
  font: inherit; font-size: 11.5px;
  border: 1px solid var(--line, #cabfad); background: var(--paper, #f5f0e6);
  border-radius: 999px; padding: 5px 12px; color: var(--ink-2, #6b6459); cursor: pointer;
}
.ed-seg button.on { border-color: var(--accent, #7a2e25); background: var(--accent-soft, #f6e9e4); color: var(--accent, #7a2e25); }
.ed-seg button.on.ed-gold { border-color: var(--gold, #b8965e); background: #f7efe0; color: #8a6d33; }
.ed-seg button.on.ed-heart { border-color: #b06a8f; background: #f7e9f0; color: #9c4f78; }

.ed-chip {
  font: inherit; font-size: 11.5px;
  border: 1px solid var(--accent, #7a2e25); background: var(--accent-soft, #f6e9e4);
  border-radius: 999px; padding: 5px 12px; color: var(--accent, #7a2e25); cursor: pointer;
}
.ed-srclink { display: inline-block; margin-top: 5px; font-size: 12px; color: var(--accent, #7a2e25); }
.ed-reading .ed-pane .ed-srclink { cursor: pointer; }
.ed-hint { font-size: 11px; color: var(--ink-3, #9a9184); font-style: italic; margin-top: 6px; line-height: 1.5; }

.ed-stub {
  background: var(--card, #fffdf8); border: 1px dashed var(--line, #cabfad);
  border-radius: 12px; padding: 16px; font-size: 12.5px; color: var(--ink-3, #9a9184);
  font-style: italic; margin-top: 20px;
}

.ed-foot {
  display: flex; gap: 10px; justify-content: flex-end; align-items: center;
  padding: 16px 24px;
  background: var(--card, #fffdf8);
  border-top: 1px solid var(--line, #cabfad);
}
.ed-foot .ed-status { margin-right: auto; font-size: 12px; color: var(--ink-3, #9a9184); font-style: italic; }
.ed-foot .ed-ghost {
  font: inherit; font-size: 13px; background: none;
  border: 1px solid var(--line, #cabfad); border-radius: 999px;
  padding: 9px 20px; color: var(--ink-2, #6b6459); cursor: pointer;
}
.ed-foot .ed-save {
  font: inherit; font-size: 13px;
  background: var(--accent, #7a2e25); color: #fff;
  border: none; border-radius: 999px; padding: 9px 24px; cursor: pointer;
}
.ed-foot .ed-save:disabled { opacity: .5; cursor: default; }

.ed-foot .ed-help-btn { margin-right: auto; }

/* ---------- READING, NOT EDITING (Kaye, Aug 12) ----------
   The card opens as a reading. Everything is legible; nothing invites a
   keystroke. The fields lose their "type here" costume — no white wells,
   no borders — so it reads as a page rather than a form, and a thumb
   passing over it has nothing to catch on. */
.ed-reading .ed-pane input,
.ed-reading .ed-pane textarea,
.ed-reading .ed-pane select {
  background: transparent; border-color: transparent;
  padding: 3px 0; min-height: 0; color: var(--ink, #2c2a26);
  cursor: default;
}
.ed-reading .ed-pane input::placeholder,
.ed-reading .ed-pane textarea::placeholder { color: transparent; }
/* While reading, the record must stay LEGIBLE — old eyes are the audience
   (Kaye, Aug 12: "The children are very faint"). Only the unchosen OPTIONS
   fade; names and the chosen words keep their full ink. */
.ed-reading .ed-pane .ed-seg button:not(.on):not(.ed-chip) { opacity: .35; }
.ed-reading .ed-pane .ed-seg button { cursor: default; }
.ed-reading .ed-pane .ed-chip {
  opacity: 1; cursor: default;
  background: transparent; border-color: var(--line, #cabfad);
  color: var(--ink, #2c2a26);
}
/* a reading shows only what's recorded: an empty wedding date or place
   disappears, and the little "and" goes with its empty box */
.ed-reading .ed-pane .ed-wedrow input:placeholder-shown { display: none; }
.ed-reading .ed-pane .ed-wedrow span:has(+ input:placeholder-shown) { display: none; }

/* actions have no place in a reading: the add-rows and remove ✕s step out */
.ed-reading .ed-pane #edSibOpenBtn,
.ed-reading .ed-pane [data-unchild], .ed-reading .ed-pane [data-sibrm],
.ed-reading .ed-pane [data-srm], .ed-reading .ed-pane [data-resdel],
.ed-reading .ed-pane [data-wkdel], .ed-reading .ed-pane [data-krm] { display: none; }
.ed-reading .ed-pane .ed-fld label { color: var(--ink-3, #9a9184); }
.ed-reading .ed-pane #edParSearch, .ed-reading .ed-pane #edParResults,
.ed-reading .ed-pane #edPartSearch, .ed-reading .ed-pane #edPartResults,
.ed-reading .ed-pane #edKidSearch, .ed-reading .ed-pane #edKidResults { display: none; }
.ed-reading .ed-pane .ed-fld:has(#edParSearch), .ed-reading .ed-pane .ed-fld:has(#edPartSearch),
.ed-reading .ed-pane .ed-fld:has(#edKidSearch) { display: none; }
.ed-reading .ed-pane .ed-hint { opacity: .7; }

.ed-unlock {
  font: inherit; font-size: 13px;
  background: var(--accent-soft, #f6e9e4); color: var(--accent, #7a2e25);
  border: 1px solid var(--accent, #7a2e25); border-radius: 999px;
  padding: 9px 20px; cursor: pointer;
}
.ed-readnote {
  font-size: 12px; color: var(--ink-3, #9a9184); font-style: italic;
  margin-right: auto; max-width: 46ch; line-height: 1.45;
}

/* ---------- the pause before it's written ---------- */
.edc-back {
  position: absolute; inset: 0; z-index: 30;
  background: rgba(40, 30, 18, .38);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.edc {
  background: var(--card, #fffdf8); border-radius: 16px;
  border: 1px solid var(--line, #cabfad);
  box-shadow: 0 18px 50px rgba(20, 15, 8, .28);
  padding: 20px 22px; max-width: 400px; width: 100%;
}
.edc-h { font-size: 17px; font-weight: 600; margin-bottom: 12px; }
.edc-what { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.edc-what span {
  font-size: 11.5px; border-radius: 999px; padding: 4px 11px;
  background: var(--accent-soft, #f6e9e4); color: var(--accent, #7a2e25);
  border: 1px solid var(--accent, #7a2e25);
}
.edc-none { font-size: 13px; font-style: italic; color: var(--ink-3, #9a9184); margin-bottom: 12px; }
.edc-note { font-size: 12.5px; color: var(--ink-2, #6b6459); line-height: 1.55; margin-bottom: 16px; }
.edc-warns { margin: 0 0 12px; }
.edc-warns div { font-size: 12.5px; line-height: 1.55; color: #8a2f1e; background: #f9ece7;
  border: 1px solid #e4c4b8; border-radius: 10px; padding: 8px 12px; margin-bottom: 6px; }
.edc-btns { display: flex; gap: 9px; justify-content: flex-end; flex-wrap: wrap; }
/* the footer's button styles are scoped to .ed-foot, so the dialog states its own */
.edc-btns .ed-ghost {
  font: inherit; font-size: 13px; background: none;
  border: 1px solid var(--line, #cabfad); border-radius: 999px;
  padding: 10px 20px; min-height: 44px; color: var(--ink-2, #6b6459); cursor: pointer;
}
.edc-btns .ed-save {
  font: inherit; font-size: 13px;
  background: var(--accent, #7a2e25); color: #fff;
  border: none; border-radius: 999px;
  padding: 10px 24px; min-height: 44px; cursor: pointer;
}

/* ✦ Guide me — a small AI helper that explains how to make corrections. */
.ed-help {
  position: absolute; left: 12px; right: 12px; bottom: 74px;
  background: var(--card, #fffdf8);
  border: 1px solid var(--accent, #7a2e25);
  border-radius: 14px;
  box-shadow: 0 16px 44px rgba(20, 15, 8, 0.28);
  display: none; flex-direction: column; overflow: hidden;
  max-height: 60%;
}
.ed-help.open { display: flex; }
.ed-help-hd {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px; border-bottom: 1px solid var(--line, #cabfad);
  font-size: 12.5px; color: var(--accent, #7a2e25); font-weight: 600;
}
.ed-help-hd .ed-help-min { margin-left: auto; background: none; border: none; font-size: 15px; line-height: 1; color: var(--ink-3, #9a9184); cursor: pointer; padding: 0 4px; }
.ed-help-hd .ed-help-min:hover { color: var(--accent, #7a2e25); }
.ed-help-hd .ed-help-x { margin-left: 2px; background: none; border: none; font-size: 18px; color: var(--ink-3, #9a9184); cursor: pointer; padding: 0 4px; }
.ed-help.min { max-height: none; }
.ed-help.min .ed-help-msgs, .ed-help.min .ed-help-chips, .ed-help.min .ed-help-in { display: none; }
.ed-help-msgs { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 9px; }
.ed-help-msg { font-size: 13px; line-height: 1.5; max-width: 88%; padding: 8px 12px; border-radius: 12px; }
.ed-help-msg.me { align-self: flex-end; background: var(--accent-soft, #f6e9e4); color: var(--ink, #2c2a26); }
.ed-help-msg.bot { align-self: flex-start; background: var(--paper, #f5f0e6); color: var(--ink, #2c2a26); }
.ed-help-msg.bot strong { color: var(--accent, #7a2e25); }
.ed-help-msg.thinking { align-self: flex-start; color: var(--ink-3, #9a9184); font-style: italic; }
.ed-help-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.ed-help-chip { font: inherit; font-size: 11.5px; border: 1px solid var(--line, #cabfad); background: var(--paper, #f5f0e6); border-radius: 999px; padding: 5px 11px; color: var(--ink-2, #6b6459); cursor: pointer; text-align: left; }
.ed-help-chip:hover { border-color: var(--accent, #7a2e25); color: var(--accent, #7a2e25); }
.ed-help-in { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line, #cabfad); }
.ed-help-in input { flex: 1; font: inherit; font-size: 13px; border: 1px solid var(--line, #cabfad); border-radius: 999px; padding: 8px 13px; background: var(--paper, #f5f0e6); color: var(--ink, #2c2a26); }
.ed-help-in input:focus { outline: none; border-color: var(--accent, #7a2e25); }
.ed-help-in button { font: inherit; font-size: 13px; background: var(--accent, #7a2e25); color: #fff; border: none; border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.ed-help-in button:disabled { opacity: .5; cursor: default; }

/* Photo studio — crop to one person + gentle cleanup, before saving. */
.ps-back { position: fixed; inset: 0; z-index: 1400; background: rgba(30, 22, 12, 0.62); display: none; align-items: center; justify-content: center; padding: 20px; }
.ps-back.open { display: flex; }
.ps-card { background: var(--paper, #f5f0e6); color: var(--ink, #2c2a26); border-radius: 16px; box-shadow: 0 24px 70px rgba(20, 15, 8, 0.5); width: 360px; max-width: 94vw; max-height: 92vh; overflow-y: auto; font-family: 'Lora', Georgia, serif; }
.ps-hd { padding: 14px 18px; border-bottom: 1px solid var(--line, #cabfad); font-size: 13px; letter-spacing: .04em; color: var(--accent, #7a2e25); font-weight: 600; display: flex; align-items: center; }
.ps-hd .ps-x { margin-left: auto; background: none; border: none; font-size: 20px; color: var(--ink-3, #9a9184); cursor: pointer; }
.ps-body { padding: 16px 18px; }
.ps-stage { width: 280px; height: 280px; max-width: 100%; margin: 0 auto; border-radius: 50%; overflow: hidden; background: #000; position: relative; touch-action: none; cursor: grab; box-shadow: 0 0 0 1px var(--line, #cabfad); }
.ps-stage:active { cursor: grabbing; }
.ps-stage canvas { display: block; width: 100%; height: 100%; }
.ps-hint { text-align: center; font-size: 11.5px; color: var(--ink-3, #9a9184); font-style: italic; margin: 8px 0 4px; }
.ps-row { display: flex; align-items: center; gap: 10px; margin: 9px 0; font-size: 12px; color: var(--ink-2, #6b6459); }
.ps-row label { flex: 0 0 78px; text-transform: uppercase; letter-spacing: .1em; font-size: 10px; color: var(--ink-3, #9a9184); }
.ps-row input[type=range] { flex: 1; accent-color: var(--accent, #7a2e25); }
.ps-fit { width: 100%; margin: 4px 0 2px; font: inherit; font-size: 12px; background: none; color: var(--ink-2, #6b6459); border: 1px solid var(--line, #cabfad); border-radius: 999px; padding: 7px; cursor: pointer; }
.ps-fit:hover { border-color: var(--accent, #7a2e25); color: var(--accent, #7a2e25); }
.ps-remove { width: 100%; margin: 8px 0 2px; font: inherit; font-size: 12px; background: none; color: var(--ink-3, #9a9184); border: 1px solid var(--line, #cabfad); border-radius: 999px; padding: 7px; cursor: pointer; }
.ps-remove:hover { border-color: #b4553c; color: #b4553c; }
.ps-remove:disabled { opacity: .6; cursor: default; }
.ps-ai { width: 100%; margin-top: 6px; font: inherit; font-size: 12.5px; background: var(--accent-soft, #f6e9e4); color: var(--accent, #7a2e25); border: 1px solid var(--accent, #7a2e25); border-radius: 999px; padding: 9px; cursor: pointer; }
.ps-ai:disabled { opacity: .6; cursor: default; }
.ps-msg { margin-top: 8px; font-size: 12px; line-height: 1.5; border-radius: 10px; padding: 8px 11px; word-break: break-word; }
.ps-msg.info { background: var(--accent-soft, #f6e9e4); color: var(--ink-2, #6b6459); }
.ps-msg.ok { background: #eef3ea; color: #4f5f45; }
.ps-msg.error { background: #f7ece6; color: #8a4a2d; }
.ps-msg a { color: var(--accent, #7a2e25); }
.ps-note { font-size: 11px; color: var(--ink-3, #9a9184); font-style: italic; margin-top: 8px; line-height: 1.5; }
.ps-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--line, #cabfad); }
.ps-foot .ps-ghost { font: inherit; font-size: 13px; background: none; border: 1px solid var(--line, #cabfad); border-radius: 999px; padding: 8px 18px; color: var(--ink-2, #6b6459); cursor: pointer; }
.ps-foot .ps-save { font: inherit; font-size: 13px; background: var(--accent, #7a2e25); color: #fff; border: none; border-radius: 999px; padding: 8px 22px; cursor: pointer; }
.ps-foot .ps-save:disabled { opacity: .5; cursor: default; }

@media (max-width: 560px) {
  .ed-hd, .ed-pane, .ed-foot { padding-left: 16px; padding-right: 16px; }
  .ed-tabs { padding-left: 16px; padding-right: 16px; }
}

/* ---------- ON A PHONE, SAVE STOPS RUNNING AWAY (Kaye, Aug 12) ----------
   Before: the sheet grew as tall as the form and the BACKDROP scrolled, so
   Save and Cancel sat at the bottom of a very long page. You had to chase
   them, and iOS rubber-banding made the chase feel springy — scroll, bounce,
   overshoot, try again.

   Now the sheet is exactly the height of the screen: the header and tabs are
   fixed at the top, the FORM scrolls inside, and the buttons are pinned to
   the bottom where your thumb already is. Nothing to chase. */
@media (max-width: 700px) {
  .ed-backdrop {
    padding: 0;
    overflow: hidden;              /* the form scrolls, not the backdrop */
    overscroll-behavior: contain;  /* and never bounces through to the page behind */
  }
  .ed-sheet {
    border-radius: 0;
    margin: 0;
    height: 100vh;
    height: var(--ed-vh, 100dvh);  /* dvh survives the address bar sliding away;
                                      --ed-vh is set live when the keyboard opens */
    display: flex; flex-direction: column;
  }
  .ed-hd, .ed-tabs, .ed-foot { flex: none; }
  .ed-pane.on {
    flex: 1 1 auto; min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  /* the bar itself: status on its own line so the buttons stay big and
     thumb-sized, and clear of the home indicator */
  .ed-foot {
    flex-wrap: wrap; gap: 8px;
    padding-top: 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -6px 18px rgba(20, 15, 8, .07);
  }
  .ed-foot .ed-status { order: -1; width: 100%; margin-right: 0; }
  .ed-foot .ed-ghost, .ed-foot .ed-save { min-height: 44px; padding-top: 11px; padding-bottom: 11px; }
  .ed-foot .ed-save { flex: 1 1 auto; }

  /* the tabs slide sideways instead of wrapping — a second row of tabs is a
     second row stolen from the form, and Remove looked stranded on its own line */
  .ed-tabs {
    flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .ed-tabs::-webkit-scrollbar { display: none; }
  .ed-tab { flex: none; white-space: nowrap; }
  .ed-tab-remove { margin-left: 4px; }
}

/* ---------- the welcome walk (create-as-interview, Aug 2026) ---------- */
.edw-eyebrow { font-size: 10.5px; letter-spacing: .13em; color: var(--ink-3, #9a9184); margin: 2px 0 8px; }
.edw-h { font-size: 19px; margin: 0 0 6px; }
.edw-big { width: 100%; font: inherit; font-size: 17px; padding: 11px 13px; border: 1px solid var(--border, #cabfad); border-radius: 10px; background: #fffefb; color: inherit; margin-top: 10px; }
.edw-big:focus { outline: none; border-color: var(--accent, #7a2e25); }
.edw-heard { margin-top: 10px; padding: 10px 13px; background: #f7f1e3; border: 1px dashed var(--border, #cabfad); border-radius: 10px; font-size: 12.5px; color: var(--ink-2, #6b6156); cursor: pointer; }
.edw-chip { display: inline-block; background: #fffdf8; border: 1px solid var(--border, #cabfad); border-radius: 999px; padding: 2px 10px; margin: 4px 3px 0 0; font-size: 12px; }
.edw-chip small { color: var(--ink-3, #9a9184); font-style: italic; }
.edw-chip b { color: var(--accent, #7a2e25); }
.edw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.edw-grid input { width: 100%; font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--border, #cabfad); border-radius: 8px; background: #fffefb; }
.edw-lbl { display: block; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3, #9a9184); margin-bottom: 3px; }
.edw-kidrow { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.edw-kidrow > span { min-width: 110px; font-size: 14px; }
.edw-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; }
.edw-dots { text-align: center; margin-top: 12px; }
.edw-dots i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--border, #cabfad); margin: 0 3px; }
.edw-dots i.on { background: var(--accent, #7a2e25); }
.edw-say { font-size: 15.5px; line-height: 1.7; background: #f7f1e3; border: 1px solid var(--border, #cabfad); border-radius: 12px; padding: 15px 17px; margin-top: 8px; }
.edw-say b { color: var(--accent, #7a2e25); }
/* the marriage record row under a partner's bond seg */
.ed-wedrow { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 7px;
  font-size: 12.5px; color: var(--ink-3, #9a9184); font-style: italic; }
.ed-wedrow input { font: inherit; font-style: normal; font-size: 13px; padding: 6px 9px; width: 190px;
  border: 1px solid var(--border, #cabfad); border-radius: 8px; background: #fffefb; color: var(--ink, #2c2a26); }
.ed-wedrow input:focus { outline: none; border-color: var(--accent, #7a2e25); }


/* ===== The duplicate catcher (Kaye, Aug 10) =====
   A duplicate conceals itself, so the record speaks before one exists. */
.ed-hitcard{display:block;width:100%;text-align:left;font:inherit;cursor:pointer;
  background:var(--paper2,#fffdf7);border:1px solid var(--line,#d6cdb8);border-radius:11px;
  padding:9px 11px;margin-top:7px;color:var(--ink,#2c2620)}
.ed-hitcard:hover{border-color:var(--accent,#7c5cbf)}
.ed-hitnm{display:block;font-size:15px;font-weight:600;line-height:1.25}
.ed-hitdt{display:block;font-size:12px;color:var(--ink-3,#9a9184);margin-top:2px}
.ed-hitpp{display:block;font-size:12.5px;color:var(--ink-2,#6b6355);font-style:italic;margin-top:4px;line-height:1.4}

.ed-dupwrap{background:var(--aged,#efe9d8);border:1.5px solid var(--aged-border,#c9b98a);
  border-radius:14px;padding:13px 14px;margin-top:12px}
.ed-dupeye{font-size:11px;letter-spacing:.13em;text-transform:uppercase;color:#8a6410;font-weight:600}
.ed-dupq{font-size:16px;line-height:1.35;margin-top:6px}
.ed-dupq b{color:var(--blood,#a03123)}
.ed-dupcard{background:var(--paper2,#fffdf7);border:1px solid var(--line,#d6cdb8);border-radius:11px;
  padding:10px 11px;margin-top:10px}
.ed-dupnm{font-size:15px;font-weight:600;line-height:1.25}
.ed-dupdt{font-size:12px;color:var(--ink-3,#9a9184);margin-top:2px}
.ed-duppp{font-size:12.5px;color:var(--ink-2,#6b6355);font-style:italic;margin-top:4px;line-height:1.4}
.ed-dupacts{display:flex;flex-direction:column;gap:7px;margin-top:11px}
.ed-dupacts button{font:inherit;font-size:14.5px;padding:10px 12px;border-radius:11px;
  border:1px solid var(--line,#d6cdb8);background:var(--paper2,#fffdf7);cursor:pointer;text-align:left;
  color:var(--ink,#2c2620)}
.ed-dupacts button:hover{border-color:var(--accent,#7c5cbf)}
.ed-dupacts .ed-dupyes{background:var(--accent,#7c5cbf);border-color:var(--accent,#7c5cbf);color:#fff;font-weight:600}
.ed-dupwhy{font-size:11.5px;color:var(--ink-3,#9a9184);font-style:italic;margin-top:9px;line-height:1.45}
.ed-dupheld{opacity:.42;pointer-events:none}
.ed-dupheldnote{font-size:11.5px;font-style:italic;color:#8a6410;text-align:right;margin-top:6px}
