/* The Scadden Family: heritage theme from the approved wireframes (2 October 2026). */
:root {
  --red: #7a1f2b; --red-dark: #5e1520; --gold: #b8892a; --gold-soft: #f6ecd4;
  --bg: #f7f3ea; --panel: #fff; --ink: #2a2422; --muted: #6d655e; --line: #e6dfd2;
  --ok: #1f6b45; --ok-soft: #e3f3ea; --warn: #8a5a00; --warn-soft: #fbf0d9; --bad: #a3242f; --bad-soft: #fbe5e7;
  --radius: 12px; --serif: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--red); }
a:hover { color: var(--red-dark); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: normal; color: var(--red-dark); line-height: 1.25; }
h1 { font-size: 2rem; margin: .2em 0 .5em; }
h2 { font-size: 1.45rem; margin: 1.4em 0 .5em; }
h3 { font-size: 1.15rem; margin: 1em 0 .4em; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
main.wrap { flex: 1; padding-top: 24px; padding-bottom: 40px; }
.narrow { max-width: 560px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.skip { position: absolute; left: -999px; top: 0; background: var(--panel); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.test-strip { background: var(--gold-soft); color: var(--red-dark); text-align: center; font-size: .85rem; padding: 4px 12px; border-bottom: 1px solid var(--line); }

/* Header */
.top { background: var(--red); color: #fff; border-bottom: 3px solid var(--gold); display: flex; align-items: center; gap: 16px; padding: 10px 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-family: var(--serif); font-size: 1.35rem; letter-spacing: .02em; margin-right: auto; }
.brand:hover { color: #fff; }
.brand img { display: block; width: 34px; height: auto; }
.desk-nav { display: flex; align-items: center; gap: 6px; }
.desk-nav a:not(.btn) { color: #f3e6c8; text-decoration: none; padding: 6px 10px; border-radius: 8px; }
.desk-nav a:not(.btn):hover, .desk-nav a[aria-current="page"] { background: var(--red-dark); color: #fff; }
.me-link { flex: none; display: block; border-radius: 50%; line-height: 0; box-shadow: 0 0 0 2px var(--gold-soft); }
.me-link:hover, .me-link[aria-current="page"] { box-shadow: 0 0 0 2px #fff; }
.me-link .face { width: 36px; height: 36px; }
/* The bell beside the member's picture: what's new, opening over the page (Pages/Shared/_Bell.cshtml). */
.bell { position: relative; flex: none; }
.bell > summary { list-style: none; cursor: pointer; position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #f3e6c8; }
.bell > summary::-webkit-details-marker { display: none; }
.bell > summary:hover, .bell[open] > summary { background: var(--red-dark); color: #fff; }
.bell > summary svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.bell-dot { position: absolute; top: 6px; right: 7px; width: 10px; height: 10px; border-radius: 50%; background: #e0312f; box-shadow: 0 0 0 2px var(--red); }
.bell-panel { position: absolute; right: -8px; top: calc(100% + 10px); z-index: 20; width: min(380px, calc(100vw - 24px)); max-height: min(70vh, 520px); overflow-y: auto;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.bell-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); }
.bell-head form { margin: 0; }
.bell-list { list-style: none; margin: 0; padding: 0; }
.bell-list li { display: flex; align-items: flex-start; border-bottom: 1px solid var(--line); }
.bell-list li:last-child { border-bottom: 0; }
.bell-list a { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 10px 6px 10px 14px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.bell-list a:hover { background: var(--gold-soft); }
.bell-list form { margin: 0; }
.bell-x { background: none; border: 0; color: var(--muted); font-size: 1.3rem; line-height: 1; padding: 10px 12px; cursor: pointer; }
.bell-x:hover { color: var(--bad); }
.bell-empty { margin: 0; padding: 14px; }
@media (max-width: 760px) {
  .top { position: relative; }
  .bell { position: static; }
  .bell-panel { left: 10px; right: 10px; top: calc(100% + 6px); width: auto; }
}
.bell-page { padding: 0; overflow: hidden; max-width: 560px; }
.bell-page .bell-head { position: static; }
/* Between phone and wide screens, just the crest, so the whole menu fits on one line. */
@media (min-width: 761px) and (max-width: 1000px) {
  .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .desk-nav { gap: 2px; }
  .desk-nav a:not(.btn) { padding: 6px 8px; }
}

/* Buttons */
.btn { display: inline-block; border: 1.5px solid transparent; border-radius: 999px; padding: 9px 20px; font: inherit; font-weight: 600; font-size: .95rem; line-height: 1.3; text-decoration: none; cursor: pointer; text-align: center; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #9d7422; color: #fff; }
.btn-outline { border-color: var(--red); color: var(--red); background: transparent; }
.btn-outline:hover { background: var(--gold-soft); }
.btn-light { background: #fff; color: var(--red); }
.btn-light:hover { background: var(--gold-soft); color: var(--red-dark); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { background: #821c25; color: #fff; }
.btn-link { background: none; border: 0; padding: 0; color: var(--red); text-decoration: underline; font-weight: normal; cursor: pointer; font: inherit; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }

/* Cards and panels */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 16px; }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card.gold-top { border-top: 3px solid var(--gold); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.flash { background: var(--ok-soft); color: var(--ok); border-radius: 10px; padding: 10px 14px; margin: 0 0 18px; overflow-wrap: anywhere; }
.alert { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; }
.alert-bad { background: var(--bad-soft); color: var(--bad); }

/* Public home */
.hero { display: grid; grid-template-columns: 170px 1fr; gap: 32px; align-items: center; padding: 16px 0 28px; }
.hero img { width: 170px; height: auto; }
.hero h1 { font-size: 2.3rem; margin-top: 0; }
.hero p { color: var(--muted); font-size: 1.1rem; }
.panel h2 { margin-top: 0; font-size: 1.25rem; }
.panel p { color: var(--muted); margin: 0; }

/* Forms */
.form { display: grid; gap: 16px; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: 4px; }
.field .hint { display: block; color: var(--muted); font-size: .9rem; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=url], input[type=search], input[type=tel], input[type=file], input[type=number], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid #cfc6b6; border-radius: 8px; padding: 10px 12px; min-height: 48px; }
textarea { min-height: 110px; }
input:focus, select:focus, textarea:focus { border-color: var(--red); outline: 2px solid var(--gold-soft); }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--red); }
.check label { font-weight: normal; }
.check.choice { margin-top: 8px; }
.address { overflow-wrap: anywhere; }
.field-error, .validation-summary-errors { color: var(--bad); font-size: .95rem; }
.validation-summary-errors ul { margin: 0; padding-left: 20px; }
.input-validation-error { border-color: var(--bad); }
.validation-summary-valid { display: none; }
.code-input { font-family: ui-monospace, Consolas, monospace; font-size: 1.4rem; letter-spacing: .25em; max-width: 220px; }

/* Tables (admin) */
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }
dl.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 16px; }
.filters .field { min-width: 160px; flex: 1; }
.filters .grow { flex: 3; }

.badge { display: inline-block; border-radius: 999px; padding: 1px 10px; font-size: .8rem; font-weight: 600; background: var(--line); color: var(--ink); white-space: nowrap; }
.badge.Active, .badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.Invited, .badge.Legacy, .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.Disabled, .badge.Deleted, .badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.Admin { background: var(--red); color: #fff; }
.badge.Moderator { background: var(--gold-soft); color: var(--red-dark); }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-family: var(--serif); font-size: 1.9rem; font-weight: normal; color: var(--red-dark); }
.stat span { color: var(--muted); font-size: .9rem; }
.subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.subnav a { text-decoration: none; border: 1px solid var(--line); background: var(--panel); padding: 5px 14px; border-radius: 999px; font-size: .95rem; }
.subnav a[aria-current="page"] { background: var(--red); color: #fff; border-color: var(--red); }
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list li { border-bottom: 1px solid var(--line); }
.menu-list li:last-child { border-bottom: 0; }
.menu-list a, .menu-list button { display: block; width: 100%; text-align: left; padding: 14px 4px; text-decoration: none; font: inherit; color: var(--ink); background: none; border: 0; cursor: pointer; }
.menu-list a:hover, .menu-list button:hover { color: var(--red); }
.qr { background: #fff; padding: 8px; border: 1px solid var(--line); border-radius: 8px; width: 216px; height: 216px; image-rendering: pixelated; }
.codes { font-family: ui-monospace, Consolas, monospace; columns: 2; list-style: none; padding: 0; font-size: 1.05rem; }
.key { font-family: ui-monospace, Consolas, monospace; word-break: break-all; background: var(--gold-soft); padding: 4px 8px; border-radius: 6px; }
pre.detail { white-space: pre-wrap; word-break: break-word; font-size: .8rem; background: var(--bg); padding: 10px; border-radius: 8px; max-height: 320px; overflow: auto; }
details summary { cursor: pointer; }
a.stat { text-decoration: none; color: inherit; }
a.stat:hover { border-color: var(--gold); }
.menu-list li.audit-line { padding: 10px 4px; }
.menu-list button.danger-text { color: var(--bad); }
.menu-list form { margin: 0; }

/* Forum archive and profiles */
th.num, td.num { text-align: right; }
.crumbs { margin: 0 0 4px; font-size: .9rem; color: var(--muted); }
.tree-whole { margin: 4px 0 12px; }
.archive-banner { background: var(--gold-soft); color: var(--red-dark); border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; }
.archive-post header p { margin: 0 0 10px; }
.archive-post .post-title { font-size: 1.05rem; margin: 0 0 2px; }
.depth-1 { margin-left: 24px; } .depth-2 { margin-left: 48px; } .depth-3 { margin-left: 72px; }
.depth-4 { margin-left: 96px; } .depth-5 { margin-left: 120px; }
.post-body { overflow-wrap: anywhere; }
.smiley { font-size: 1.15em; }
.post-photo { margin: 12px 0 0; }
.post-photo img { max-width: min(100%, 400px); height: auto; border-radius: 8px; border: 1px solid var(--line); }
.post-photo figcaption { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.profile-head { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.profile-head h1 { margin: 0; }
.profile-head p { margin: 4px 0 0; }
.profile-photo { width: 120px; height: 120px; object-fit: cover; border-radius: 50%; border: 3px solid var(--gold-soft); display: block; }
.profile-photo.none { display: grid; place-items: center; background: var(--gold-soft); color: var(--red-dark); font-family: var(--serif); font-size: 3rem; }
.post-list { padding-left: 18px; margin: 0; }
.post-list li { margin-bottom: 4px; }
.problem-list li { margin-bottom: 4px; }
.badge.private { background: var(--bg); color: var(--muted); font-weight: normal; vertical-align: middle; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { padding: 8px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.contact-list li:last-child { border-bottom: 0; }

/* Editing my profile: the Members / Private switch beside each detail */
.photo-edit { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 12px; }
.photo-edit > div { flex: 1; min-width: 0; }
.photo-edit p { margin: 0 0 8px; }
.remove-photo { margin-top: 8px; }
.vis { display: inline-flex; margin-top: 6px; border: 1.5px solid #cfc6b6; border-radius: 999px; overflow: hidden; font-size: .9rem; }
.vis input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.field .vis label { display: inline-block; margin: 0; padding: 4px 14px; font-weight: normal; cursor: pointer; color: var(--muted); }
.vis input:checked + label { background: var(--red); color: #fff; font-weight: 600; }
.vis input:focus-visible + label { outline: 2px solid var(--gold); outline-offset: -2px; }

/* Picture viewer over the page (js/site.js) */
a[data-lightbox] { cursor: zoom-in; }
html.lb-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(20, 14, 12, .92); color: #fff; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(20, 14, 12, .6); }
.lightbox figure { margin: 0; flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 56px 12px 20px; min-width: 0; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 120px); object-fit: contain; border-radius: 6px; box-shadow: 0 8px 40px rgba(0, 0, 0, .5); background: #fff; }
.lightbox figcaption { color: #f1e9dc; text-align: center; max-width: 60ch; }
.lightbox button { background: rgba(255, 255, 255, .14); color: #fff; border: 0; border-radius: 999px; width: 48px; height: 48px; font-size: 1.6rem; line-height: 1; cursor: pointer; flex: none; }
.lightbox button:hover, .lightbox button:focus-visible { background: rgba(255, 255, 255, .3); outline: 2px solid var(--gold); }
.lightbox .lb-close { position: absolute; top: 10px; right: 10px; z-index: 1; }
.lightbox .lb-prev { margin-left: 10px; font-size: 2.2rem; }
.lightbox .lb-next { margin-right: 10px; font-size: 2.2rem; }
.lightbox [hidden] { display: none; }
.lightbox .lb-more { color: var(--gold-soft); font-size: .95rem; }
.lightbox .lb-more:hover { color: #fff; }
.lightbox.slideshow figure { padding-bottom: 76px; }
.lightbox.slideshow img { max-height: calc(100dvh - 176px); }
.lightbox .lb-play { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); width: auto; height: 40px; padding: 0 18px; font-size: 1rem; }

/* What's ready (More) */
.progress-day h3 { margin: 0 0 8px; display: flex; gap: 10px; align-items: center; }
.feature-list { margin: 0; padding-left: 0; list-style: none; }
.feature-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.feature-list li:last-child { border-bottom: 0; }
.feature-list p { margin: 4px 0; color: var(--muted); }
.feature-list.coming { padding-left: 22px; list-style: decimal; }
.feature-list.coming li::marker { color: var(--gold); font-weight: 700; }

/* Family directory */
.member-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.member-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; height: 100%; padding: 16px 10px; text-decoration: none; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.member-card:hover { border-color: var(--gold); }
.member-card img, .member-card .initial { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold-soft); margin-bottom: 6px; }
.member-card .initial { display: grid; place-items: center; background: var(--gold-soft); color: var(--red-dark); font-family: var(--serif); font-size: 2.2rem; }
.member-card .name { font-weight: 600; color: var(--red-dark); }

/* Family news feed */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
form.inline { display: inline; }
.feed-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.feed-side h2 { font-size: 1.15rem; margin: 0 0 10px; }
.feed-single { max-width: 680px; }
.face { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.face.initial { display: grid; place-items: center; background: var(--gold-soft); color: var(--red-dark); font-family: var(--serif); font-size: 1.1rem; }
.side-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 10px; }
.side-list li { display: flex; gap: 10px; align-items: center; line-height: 1.3; }
.birthday-strip { display: none; }
.this-week { margin-bottom: 18px; }
.this-week-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.this-week-head h2 { font-size: 1.15rem; margin: 0; }
.this-week-head a { white-space: nowrap; font-size: .95rem; }
.album-link { margin: 12px 0 0; }

.composer textarea { width: 100%; min-height: 80px; resize: vertical; }
.composer-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.composer-bar .hint { margin-right: auto; }
.add-photos { position: relative; overflow: hidden; }
.add-photos input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.add-photos:focus-within { outline: 3px solid var(--gold); outline-offset: 2px; }
.composer-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.composer-photos:not(:empty) { margin-top: 10px; }
.upload { position: relative; width: 84px; height: 84px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; font-size: .75rem; color: var(--muted); overflow: hidden; }
.upload img { width: 100%; height: 100%; object-fit: cover; }
.upload-remove { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; font-size: .8rem; cursor: pointer; line-height: 1; }

.post.pinned { border-top: 3px solid var(--gold); }
.post-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.post-who { margin-right: auto; line-height: 1.3; }
.post-who .author { font-weight: 600; text-decoration: none; }
.post-who .when { color: inherit; text-decoration: none; }
.post-who .when:hover { text-decoration: underline; }
.post-menu { position: relative; }
.post-menu summary { list-style: none; cursor: pointer; padding: 2px 10px; border-radius: 8px; font-size: 1.3rem; line-height: 1; color: var(--muted); }
.post-menu summary::-webkit-details-marker { display: none; }
.post-menu summary:hover { background: var(--bg); }
.post-menu .menu { position: absolute; right: 0; top: 100%; z-index: 3; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 20px rgba(0, 0, 0, .1); padding: 8px 14px; display: grid; gap: 6px; min-width: 150px; }
.post-body { overflow-wrap: anywhere; }
.post-body p:last-child, .comment-body p:last-child { margin-bottom: 0; }
.post-photos { display: grid; gap: 4px; margin: 12px -22px 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.post-photos a { display: block; aspect-ratio: 1; overflow: hidden; background: var(--bg); }
.post-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-photos.count-1 { grid-template-columns: 1fr; }
.post-photos.count-1 a { aspect-ratio: auto; max-height: 560px; display: flex; justify-content: center; }
.post-photos.count-1 img { width: auto; max-width: 100%; height: auto; max-height: 560px; object-fit: contain; }
.post-photos.count-2, .post-photos.count-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.post-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.like { background: none; border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 14px; font: inherit; font-size: .95rem; cursor: pointer; color: var(--muted); }
.like:hover { border-color: var(--red); color: var(--red); }
.like.liked, .btn-link.liked { color: var(--red); font-weight: 600; }
.like.liked { border-color: var(--red); background: var(--bad-soft); }
.likers { display: inline-block; position: relative; color: var(--red); }
.likers summary { cursor: pointer; list-style: none; }
.likers summary::-webkit-details-marker { display: none; }
.likers ul { position: absolute; left: 0; top: 100%; z-index: 3; margin: 4px 0 0; padding: 8px 14px; list-style: none; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 20px rgba(0, 0, 0, .1); color: var(--ink); white-space: nowrap; font-size: .9rem; }
.comment-count { margin-left: auto; }

.comments { margin-top: 12px; display: grid; gap: 10px; }
.comment { display: flex; gap: 8px; align-items: flex-start; }
.comment .face { width: 32px; height: 32px; font-size: .9rem; }
.comment-box { flex: 1; min-width: 0; }
.bubble { background: var(--bg); border-radius: 14px; padding: 8px 12px; overflow-wrap: anywhere; }
.bubble .author { font-weight: 600; font-size: .9rem; text-decoration: none; }
.comment-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 2px 12px 0; }
.comment-meta .btn-link, .comment-meta a, .reply-box summary { font-size: inherit; color: var(--muted); text-decoration: none; }
.comment-meta .btn-link:hover, .comment-meta a:hover, .reply-box summary:hover { color: var(--red); text-decoration: underline; }
.reply-box summary { cursor: pointer; list-style: none; }
.reply-box summary::-webkit-details-marker { display: none; }
.reply-box[open] { flex-basis: 100%; order: 10; }
.replies { display: grid; gap: 8px; margin-top: 8px; }
.comment-gone { margin: 4px 12px; font-style: italic; }
.comment-form { display: flex; gap: 8px; align-items: flex-end; }
.comment-form textarea { flex: 1; min-height: 42px; resize: vertical; }
.comment-form .btn { padding: 8px 16px; }
.reply-box .comment-form { margin-top: 6px; }
.pager { display: flex; gap: 14px; align-items: center; justify-content: center; margin-top: 20px; }

/* Photo albums */
.page-head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.page-head h1 { margin: 0; }
.album-meta { margin: 4px 0 0; }
.album-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.album-actions form { margin: 0; display: flex; gap: 8px; }
.album-about { max-width: 70ch; margin-bottom: 16px; }
.album-about p { margin: 0 0 8px; }
.album-uploads:not(:empty) { margin-bottom: 16px; }
.album-uploads p { margin: 8px 0 0; }
.album-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.album-card { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.album-card:hover { border-color: var(--gold); }
.album-card img, .album-card .album-empty { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--bg); }
.album-card .album-empty { display: grid; place-items: center; font-size: 2.6rem; }
.album-card-text { display: grid; gap: 2px; padding: 10px 14px 14px; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin-bottom: 12px; }
.album-grid a { position: relative; display: block; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: var(--bg); }
.album-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.album-grid a:hover img { transform: scale(1.04); }
.tile-counts { position: absolute; right: 6px; bottom: 6px; background: rgba(0, 0, 0, .6); color: #fff; font-size: .75rem; border-radius: 999px; padding: 2px 8px; }
.photo-page { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.photo-stage { margin: 0; }
.photo-stage > a { display: block; background: #1d1714; border-radius: var(--radius); overflow: hidden; }
.photo-stage img { display: block; width: 100%; height: auto; max-height: 75vh; object-fit: contain; }
.photo-steps { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin-top: 10px; }
.photo-steps a[rel="next"] { justify-self: end; }
.photo-caption { margin-bottom: 12px; }
.photo-caption p { margin: 0 0 8px; }
.photo-by { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.photo-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.photo-tools .btn { padding: 6px 14px; }
.caption-edit { margin-bottom: 8px; }
.btn-link.danger { color: var(--bad); }
.photo-side .comments h2 { font-size: 1.15rem; margin: 0 0 10px; }
.photo-side .comment { margin-bottom: 10px; }

/* Keeping in touch */
.group-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 14px; }
.group-card h2 { margin: 6px 0 4px; font-size: 1.3rem; overflow-wrap: anywhere; }
.group-card p { margin: 0 0 10px; overflow-wrap: anywhere; }
.group-card p:last-child { margin-bottom: 0; }
.platform { display: inline-block; border-radius: 999px; padding: 1px 10px; font-size: .8rem; font-weight: 600; }
.platform-whatsapp { background: #e1f5e8; color: #126b37; }
.platform-messenger { background: #e4effd; color: #1452a8; }
.group-admin { list-style: none; margin: 0; padding: 0; }
.group-admin li { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.group-admin li:last-child { border-bottom: 0; }
.group-admin .group-name { flex: 1; min-width: 12em; overflow-wrap: anywhere; }
.group-admin form { display: inline; }
.btn.btn-small { padding: 4px 14px; }

/* Events */
.view-switch { display: inline-flex; border: 1.5px solid var(--red); border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.view-switch a { padding: 5px 18px; text-decoration: none; font-weight: 600; font-size: .95rem; }
.view-switch a[aria-current="page"] { background: var(--red); color: #fff; }
.month-head { font-size: 1.25rem; margin: 22px 0 8px; }
.event-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.event-row { display: flex; gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.event-row.birthday { background: transparent; border-style: dashed; padding-top: 6px; padding-bottom: 6px; }
.event-row-text { flex: 1; min-width: 0; display: grid; gap: 2px; overflow-wrap: anywhere; }
.event-title { font-weight: 600; font-size: 1.05rem; }
.date-tile { flex: none; width: 52px; text-align: center; line-height: 1.1; border-radius: 10px; background: var(--gold-soft); color: var(--red-dark); padding: 6px 0; }
.date-tile .dow { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.date-tile .dnum { display: block; font-family: var(--serif); font-size: 1.45rem; }
.date-tile.today { background: var(--red); color: #fff; }
.event-row.birthday .date-tile { background: transparent; }
.event-row.birthday .date-tile.today { background: var(--red); }
.event-row.past .date-tile { color: var(--muted); }
.event-thumb { flex: none; width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.events-foot { margin-top: 20px; }
.events-foot a[href*="past"] { margin-left: 8px; white-space: nowrap; }
.month-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin: 8px 0 4px; }
.month-nav h2 { margin: 0; text-align: center; }
.month-nav a { justify-self: start; padding: 6px 14px; }
.month-nav a[rel="next"] { justify-self: end; }
.month-today { text-align: center; margin: 0 0 8px; }
.cal-week-head, .cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-week-head { margin-top: 12px; }
.cal-week-head span { text-align: center; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 4px 0; }
.cal { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--panel); }
.cal-day { min-height: 104px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 6px 6px; min-width: 0; }
.cal-day.out { background: var(--bg); }
.cal-day.out .cal-date { color: #b3aaa0; }
.cal-date { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 2px; }
.cal-day.today .cal-date { display: inline-block; background: var(--red); color: #fff; border-radius: 999px; padding: 0 8px; font-weight: 700; }
.cal-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cal-day ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; }
.cal-event, .cal-birthday { display: block; font-size: .8rem; line-height: 1.3; border-radius: 6px; padding: 2px 6px; text-decoration: none; overflow-wrap: anywhere; }
.cal-event { background: var(--red); color: #fff; }
.cal-event:hover { background: var(--red-dark); color: #fff; }
.cal-birthday { background: var(--gold-soft); color: var(--red-dark); }
.cal-time { font-weight: 700; margin-right: 4px; }
.cal-time:empty { display: none; }
.event-page { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.event-main > .event-photo { display: block; margin: -20px -22px 16px; background: #1d1714; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.event-photo img { display: block; width: 100%; max-height: 420px; object-fit: cover; }
.event-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.event-head h1 { margin: 0 0 8px; overflow-wrap: anywhere; }
.past-note { display: inline-block; background: var(--bg); color: var(--muted); border-radius: 999px; padding: 2px 12px; }
.event-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; margin: 8px 0 16px; }
.event-facts dt { font-weight: 600; color: var(--muted); }
.event-facts dd { margin: 0; overflow-wrap: anywhere; }
.event-about { margin-bottom: 16px; overflow-wrap: anywhere; }
.event-about p { margin: 0 0 8px; }
.event-tools { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.event-rsvp h2 { font-size: 1.2rem; margin: 0 0 10px; }
.event-rsvp h3 { font-size: 1.05rem; margin: 16px 0 8px; }
.rsvp-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.rsvp-choices .btn { padding: 7px 16px; }
.when-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.when-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-bottom: 10px; }
.field .when-row label { font-weight: normal; margin: 0; }
.when-row input { margin-top: 4px; }
.coming-up li { display: block; }

/* Footer */
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; padding: 16px 0; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 18px; }
.foot span { margin-left: auto; }

/* Phone tab bar (members) */
.tabs { display: none; }
.phone-only { display: none; }

@media (max-width: 760px) {
  body { font-size: 17px; }
  h1 { font-size: 1.7rem; }
  .top { padding: 8px 14px; }
  .brand { font-size: 1.15rem; }
  .desk-nav { display: none; }
  .phone-only { display: inline-block; padding: 7px 14px; }
  .hero { grid-template-columns: 1fr; text-align: center; gap: 12px; }
  .hero img { width: 120px; margin: 0 auto; }
  .hero h1 { font-size: 1.9rem; }
  .hero .actions { justify-content: center; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .foot span { margin-left: 0; }
  body.member { padding-bottom: 64px; }
  .tabs { display: grid; grid-template-columns: repeat(7, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: var(--panel); border-top: 1px solid var(--line); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
  .tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; text-decoration: none; color: var(--muted); font-size: .72rem; }
  .tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabs a[aria-current="page"] { color: var(--red); font-weight: 700; }
  dl.facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  dl.facts dd { margin-bottom: 8px; }
  .codes { columns: 1; }
  .depth-1, .depth-2, .depth-3, .depth-4, .depth-5 { margin-left: 0; border-left: 3px solid var(--gold-soft); }
  .profile-photo { width: 84px; height: 84px; }
  .profile-grid { grid-template-columns: minmax(0, 1fr); }
  .member-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .member-card img, .member-card .initial { width: 72px; height: 72px; }
  .photo-edit { flex-direction: column; }
  .feed-layout { grid-template-columns: minmax(0, 1fr); }
  .feed-side { display: none; }
  .birthday-strip { display: flex; gap: 8px; overflow-x: auto; margin: -6px 0 14px; padding-bottom: 4px; }
  .birthday-strip a { flex: none; background: var(--gold-soft); color: var(--red-dark); border-radius: 999px; padding: 5px 14px; text-decoration: none; font-size: .9rem; white-space: nowrap; }
  .birthday-strip a.today { background: var(--red); color: #fff; }
  .birthday-strip span { opacity: .8; }
  .card.post { padding: 16px; }
  .post-photos { margin: 12px -16px 0; }
  .composer-bar .hint { flex-basis: 100%; order: 3; }
  .album-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .album-card-text { padding: 8px 10px 10px; }
  .album-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; margin-left: -6px; margin-right: -6px; }
  .album-grid a { border-radius: 0; }
  .photo-page { grid-template-columns: minmax(0, 1fr); }
  .photo-stage > a { margin: 0 -16px; border-radius: 0; }
  .event-row { padding: 8px 10px; gap: 10px; }
  .event-thumb { width: 48px; height: 48px; }
  .cal-week-head { display: none; }
  .cal { display: block; border: 0; background: transparent; }
  .cal-day { min-height: 0; display: flex; gap: 12px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; }
  .cal-day.quiet, .cal-day.out { display: none; }
  .cal-date { flex: none; width: 92px; font-size: .9rem; color: var(--red-dark); margin: 0; }
  .cal-day.today .cal-date { display: block; padding: 0 8px; }
  .cal-long { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
  .cal-day ul { flex: 1; min-width: 0; }
  .cal-event, .cal-birthday { font-size: .95rem; padding: 4px 8px; }
  .month-nav a span { display: none; }
  .event-page { grid-template-columns: minmax(0, 1fr); }
  .when-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}
/* Moderation (spec section 7) */
.hidden-note { background: var(--gold-soft); color: var(--red-dark); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.mod-links a { margin-right: 10px; }
.comment-meta .mod-links, .comment-meta > a { color: var(--muted); }
.album-grid a.tile-hidden img { opacity: .45; }
.tile-flag { position: absolute; left: 6px; top: 6px; background: var(--red); color: #fff; font-size: .75rem; border-radius: 999px; padding: 2px 8px; }
.tile-flag.wait { background: var(--warn); }
.mod-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin: 8px 0 12px; }
.mod-photo { position: relative; display: flex; flex-direction: column; gap: 4px; }
.mod-photo input { position: absolute; left: 8px; top: 8px; width: 1.3rem; height: 1.3rem; z-index: 1; }
.mod-photo label { display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.mod-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 3px solid transparent; }
.mod-photo input:checked + label img { border-color: var(--red); }
.mod-photo input:not(:checked) + label img { opacity: .55; }
.mod-reject { margin-top: 12px; }
.mod-reject summary { cursor: pointer; font-weight: 600; }
.mod-preview { display: flex; gap: 12px; align-items: flex-start; }
.mod-preview img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; flex: none; }
.mod-preview p { margin: 0 0 4px; }
.mod-summary { overflow-wrap: anywhere; }
.mod-card .actions { margin-top: 8px; }
.history { max-width: 860px; }
.history-lead { font-size: 1.1rem; color: var(--muted); max-width: 70ch; }
.history .panel h3 { margin-top: 0; font-size: 1.2rem; }
.history-privacy, .history-help { margin-top: 16px; }
.history-privacy h2, .history-help h2 { margin-top: 0; font-size: 1.25rem; }
.history-privacy h3 { font-size: 1.1rem; margin: 14px 0 4px; }
.history-lead p { margin-top: 0; }
.history-stories { margin-top: 16px; }
.history-stories h2 { margin-top: 0; font-size: 1.25rem; }
.history-stories ul { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }

/* Family history stories */
.story-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.story-card { display: flex; gap: 16px; align-items: flex-start; text-decoration: none; color: var(--ink); }
.story-card:hover { border-color: var(--gold); }
.story-card img { flex: none; width: 120px; height: 90px; object-fit: cover; border-radius: 8px; background: var(--bg); }
.story-card-text, .story-row-text { flex: 1; min-width: 0; display: grid; gap: 4px; overflow-wrap: anywhere; }
.story-title { font-weight: 600; font-size: 1.15rem; }
.story-snippet { color: var(--ink); }
.story-row { display: flex; gap: 12px; align-items: center; }
.story-filters .actions { align-self: end; }
.story { max-width: 760px; }
.story .event-head h1 { overflow-wrap: anywhere; }
.story-facts { margin: 0 0 18px; }
.story-body { font-size: 1.05rem; line-height: 1.65; overflow-wrap: anywhere; }
.story-body p { margin: 0 0 14px; }
.story-photo { margin: 18px 0; }
.story-photo img { display: block; max-width: 100%; height: auto; border-radius: 8px; }
.story-photo figcaption { margin-top: 6px; color: var(--muted); font-size: .95rem; overflow-wrap: anywhere; }
.story-photo figcaption p { margin: 0; }
.story-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; }
.story-photos .story-photo { margin: 0 0 16px; }
.story-sub { font-size: 1.2rem; margin: 24px 0 8px; }
.story-people { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.story-docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; overflow-wrap: anywhere; }
.story-sources { overflow-wrap: anywhere; }
.story-sources p { margin: 0 0 6px; }
.story-public { max-width: 760px; margin-top: 16px; }
.story-public h2 { margin-top: 0; font-size: 1.2rem; }
.story ~ .comments { max-width: 760px; margin-top: 16px; }
.story-edit-files { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.year-row { display: flex; flex-wrap: wrap; gap: 8px 16px; }

/* Family tree */
.tree-me, .tree-search, .tree-found, .tree-surnames, .person-family, .person-stories, .person-photos, .tree-candidates { max-width: 760px; margin-top: 16px; }
.tree-me h2, .tree-found h2, .tree-surnames h2, .person-family h2, .person-stories h2, .person-photos h2, .tree-candidates h2 { margin-top: 0; font-size: 1.2rem; }
.person-family h3 { font-size: 1.05rem; margin: 18px 0 6px; }
.story-links { margin: 0; padding-left: 1.2em; }
.story-links li { padding: 3px 0; }
.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; min-width: 0; }
.tree-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; overflow-wrap: anywhere; }
.marriage-edit form { max-width: 30em; margin: 6px 0 4px; }
.marriage-edit .date-row { margin-top: 0; }
.person-card { display: inline-flex; align-items: center; gap: 8px; }
.person-face { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--bg); }
.tree-surname-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.person { max-width: 760px; }
.person-head { display: flex; gap: 16px; align-items: center; min-width: 0; }
.person-head h1 { margin: 0; overflow-wrap: anywhere; }
.person-head p { margin: 2px 0 0; }
.person-photo { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; flex: none; }
.person-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 16px 0; overflow-wrap: anywhere; }
.person-facts dt { color: var(--muted); }
.person-facts dd { margin: 0; }
/* Day, month and year side by side, each label above its box and the boxes the same height */
.date-row { display: grid; grid-template-columns: 4em minmax(0, 1fr) 5.5em; gap: 8px; max-width: 30em; margin: 6px 0 10px; }
.date-row:has(> :only-child) { grid-template-columns: 5.5em; }
.field .date-row label { font-weight: normal; margin: 0; }
.date-row input, .date-row select { margin-top: 4px; }
.tree-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tree-history li p { margin: 0 0 4px; overflow-wrap: anywhere; }
.tree-history .undone b { text-decoration: line-through; color: var(--muted); }

/* The tree chart, left to right: ancestors (.ped) on the left, each level with the middle of their parents;
   the person among their brothers and sisters in the middle; descendants (.desc) on the right. Brackets join
   each person to the generation beside them. */
.tree-chart h1 { margin: 0; overflow-wrap: anywhere; }
/* Wider than the page's column on a big screen, centred under it, so seven generations fit without scrolling. */
.chart-scroll { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 8px; margin: 12px 0 16px 50%;
  width: max(100%, min(100vw - 48px, 1400px)); transform: translateX(-50%); }
.chart-row { display: flex; align-items: center; width: max-content; margin: 0 auto; }
.chart-join { flex: none; width: 16px; border-top: 1.5px solid #c9bfae; }
.ped { display: flex; flex-direction: row-reverse; align-items: center; }
.ped-self, .desc-self { flex: none; width: 180px; padding: 4px 14px; position: relative; }
.ped.has-up > .ped-self::after { content: ""; position: absolute; left: 0; top: 50%; width: 14px; border-top: 1.5px solid #c9bfae; }
.ped-up { display: flex; flex-direction: column; }
.ped-up > .ped { position: relative; }
.ped-up > .ped::before { content: ""; position: absolute; right: 0; top: 50%; width: 14px; border-top: 1.5px solid #c9bfae; }
.ped-up:not(.only) > .ped:first-child::after { content: ""; position: absolute; right: 0; top: 50%; bottom: 0; border-left: 1.5px solid #c9bfae; }
.ped-up:not(.only) > .ped:last-child::after { content: ""; position: absolute; right: 0; top: 0; bottom: 50%; border-left: 1.5px solid #c9bfae; }
.desc { display: flex; align-items: center; }
.desc.has-down > .desc-self::after { content: ""; position: absolute; right: 0; top: 50%; width: 14px; border-top: 1.5px solid #c9bfae; }
.desc-kids { display: flex; flex-direction: column; }
.desc-kids > .desc { position: relative; }
.desc-kids > .desc::before { content: ""; position: absolute; left: 0; top: 50%; width: 14px; border-top: 1.5px solid #c9bfae; }
.desc-kids:not(.only) > .desc::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 1.5px solid #c9bfae; }
.desc-kids:not(.only) > .desc:first-child::after { top: 50%; }
.desc-kids:not(.only) > .desc:last-child::after { bottom: 50%; }
/* Nobody to the left of the person and their brothers and sisters: no bracket into them. */
.chart-row:not(.has-up) > .chart-middle > .desc::before, .chart-row:not(.has-up) > .chart-middle > .desc::after { content: none; }
.chart-box { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 8px; padding: 6px 8px; min-height: 48px; overflow-wrap: anywhere; line-height: 1.25; }
.chart-text { flex: 1 1 0; display: flex; flex-direction: column; min-width: 0; }
.chart-box.sex-m { border-left-color: #6f8fb3; }
.chart-box.sex-f { border-left-color: #b9778a; }
.chart-box.focus { border-color: var(--gold); border-left-color: var(--gold); background: var(--gold-soft); }
.chart-box.placeholder { color: var(--muted); font-style: italic; }
/* ♂ or ♀ in the box's top corner, in the colour of its edge. */
.chart-sex { flex: none; align-self: flex-start; font-size: 1.25rem; line-height: 1; font-weight: 700; }
.sex-m .chart-sex { color: #4f75a3; }
.sex-f .chart-sex { color: #a85f74; }
/* Along the bottom of the box, on a row of their own so the name keeps the width: a book (family stories about
   them), a camera (album photos) and a grey figure (living, and not linked to a member's account). */
.chart-marks { flex: 1 0 100%; display: flex; justify-content: flex-end; gap: 4px; }
.chart-story, .chart-photos, .chart-unlinked { display: flex; color: var(--gold); border-radius: 4px; }
.chart-story:hover, .chart-story:focus-visible, .chart-photos:hover, .chart-photos:focus-visible, .chart-unlinked:hover, .chart-unlinked:focus-visible { color: var(--red); }
.chart-story svg, .chart-photos svg, .chart-unlinked svg { width: 20px; height: 20px; fill: var(--gold-soft); stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.chart-unlinked { color: var(--muted); }
.chart-unlinked svg { fill: none; stroke-dasharray: 3 2.2; }
.tree-not-me { margin: 0 0 12px; padding: 10px 14px; background: var(--gold-soft); border-left: 4px solid var(--gold); border-radius: 6px; }
form.tree-not-me { margin: 12px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.photo-people h2 { margin-top: 0; font-size: 1.1rem; }
.photo-people-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.photo-people-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.photo-people-add form { margin-top: 8px; }

/* The story form's people from the family tree, and finding more. */
.tree-chosen, .tree-found { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; }
.tree-pick { margin-top: 10px; }
.tree-found .btn { text-align: left; }
.stories-about { margin: 0 0 16px; }
/* The person and their partners, just below them and joined to them in gold: one couple, in one generation. */
.chart-couple { display: flex; flex-direction: column; gap: 6px; }
.chart-partner { position: relative; margin-left: 12px; }
.chart-middle > .desc > .desc-self { width: 210px; }
.chart-partner::before { content: ""; position: absolute; left: -9px; top: -7px; height: calc(50% + 7px); width: 8px; border-left: 1.5px solid var(--gold); border-bottom: 1.5px solid var(--gold); }
.chart-name { font-weight: 600; text-decoration: none; }
a.chart-name:hover { text-decoration: underline; }
.chart-add { display: flex; align-items: center; min-height: 48px; padding: 6px 10px; border: 1.5px dashed #c9bfae; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: .95rem; }
.chart-add:hover { border-color: var(--gold); color: var(--red); }
.tree-chart.loading { opacity: .6; transition: opacity .2s; }

/* GEDCOM import (moderators) */
.import-list { list-style: none; margin: 0; padding: 0; }
.import-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.import-list li:first-child { border-top: 0; }
.import-preview { list-style: none; margin: 0 0 16px; padding: 0; }
.import-preview > li { margin-bottom: 12px; }
.import-preview p { margin: 0 0 6px; }
.card.import-flagged { border-top: 3px solid var(--bad); }
.import-checks { margin: 0 0 8px; padding: 8px 12px 8px 28px; background: var(--bad-soft); color: var(--bad); border-radius: 6px; }
.import-checks li + li { margin-top: 4px; }
.import-family { display: grid; grid-template-columns: max-content 1fr; gap: 2px 10px; margin: 0 0 8px; }
.import-family dt { color: var(--muted); }
.import-family dd { margin: 0; }
.import-to-check { margin-bottom: 16px; }
.import-to-check h2 { margin-top: 0; font-size: 1.15rem; }
.import-to-check ul { margin: 0; padding-left: 20px; columns: 2 220px; }
.choices { border: 0; margin: 0; padding: 0; }
.choices label { display: block; padding: 3px 0; font-weight: normal; }
@media (max-width: 480px) {
  .person-photo { width: 64px; height: 64px; }
  .ped-self, .desc-self { width: 155px; padding: 3px 10px; }
  .ped.has-up > .ped-self::after, .ped-up > .ped::before, .desc.has-down > .desc-self::after, .desc-kids > .desc::before { width: 10px; }
}
.year-row input { width: 7em; }
.page-text { max-width: 70ch; overflow-wrap: anywhere; }
.page-text h2 { margin: 28px 0 8px; font-size: 1.35rem; }
.page-text h3 { margin: 18px 0 6px; font-size: 1.1rem; }
.page-text li { margin-bottom: 6px; }
.name-crest { float: right; margin: 0 0 12px 20px; max-width: 34%; height: auto; }
.announcement { background: var(--gold-soft); color: var(--red-dark); border-radius: 10px; padding: 10px 14px; margin: 0 0 18px; overflow-wrap: anywhere; }
.announcement a { color: inherit; }
.page-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; margin-bottom: 16px; }
.page-editor textarea { font-family: ui-monospace, Consolas, monospace; font-size: .9rem; }
.page-preview { max-height: 80vh; overflow: auto; }
.page-preview h2.small { margin: 0 0 8px; }
.page-texts, .page-versions { list-style: none; margin: 0; padding: 0; }
.page-texts li, .page-versions li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.page-texts li:last-child, .page-versions li:last-child { border-bottom: 0; }
.page-versions + form { margin-top: 12px; }
@media (max-width: 760px) {
  .page-editor { grid-template-columns: 1fr; }
  .name-crest { max-width: 40%; margin-left: 12px; }
  .story-card img { width: 84px; height: 84px; }
  .story-row { flex-wrap: wrap; }
}
.research-card h2 { margin-top: 0; }
.research-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 0; }
.research-note { white-space: pre-line; overflow-wrap: anywhere; }
.research-files { padding-left: 1.2em; overflow-wrap: anywhere; }
.research-card .actions { align-items: center; }
.research-card > form.inline { display: block; margin-top: 10px; }

/* Join requests and contact messages */
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.join-card > form.inline { display: block; margin-top: 10px; }
.join-log { margin: 0 0 12px; padding-left: 18px; color: var(--muted); overflow-wrap: anywhere; }
.join-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.team-reply { margin: 0 0 12px; padding: 4px 12px; border-left: 3px solid var(--gold-soft); }
.team-reply p { margin: 6px 0; }
.join-actions details[open] { flex: 1 1 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.join-actions summary { list-style: none; display: inline-block; }
.join-actions summary::-webkit-details-marker { display: none; }
.join-actions details .form { margin-top: 12px; }
.join-actions .muted { align-self: center; }
.join-finished { margin-top: 24px; }
.join-finished > summary { cursor: pointer; }
.join-finished > summary h2 { display: inline; font-size: 1.2rem; }
.former-item { display: flex; gap: 12px; align-items: flex-start; }
.former-item > div:last-child { flex: 1; min-width: 0; }
.former-item input { width: 1.3rem; height: 1.3rem; margin-top: 4px; }
.former-item p.small { margin: 6px 0 0; }
.mod-reports { padding-left: 18px; margin: 10px 0; }
.mod-reports li { margin-bottom: 4px; }
.mod-log td:nth-child(4), .mod-log td:nth-child(6) { min-width: 12rem; }

/* Admin, Old members */
.reinvite-stats { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.reinvite-stats .stat b { font-size: 1.5rem; }
.reinvite-stats a.stat[aria-current] { border-color: var(--red); background: var(--gold-soft); }
.reinvite-next .actions { align-items: center; }
.reinvite-next input.count { width: 6em; }
table.reinvite input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--red); }
.reinvite-actions { margin-top: 12px; }

/* Admin, System: backup downloads */
.backup-parts { list-style: none; padding: 0; margin: 8px 0 0; }
.backup-parts li + li { margin-top: 8px; }
.backup-parts form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.backup-db { margin-bottom: 20px; }
