/* Heirloom Light family rooms. Loaded after the legacy family styles and the
   shared light palette. Presentation only: records, photos, forms, destinations,
   branch geometry and preview-only boundaries remain owned by the existing app.

   Artwork provenance is recorded in ../../FAMILY-LIGHT-ART-AUDIT.md outside the app
   root. Family tree is a new candidate; light-chronicles is an existing concept.
   Neither should be described as an individually approved final illustration. */

:root[data-theme=heirloom_light] :is(.family-page,.resources-page,.church-family-page,.family-dialog,.church-dialog) {
  --light-text:#3f2c1e;
  --light-muted:#705b44;
  --light-accent:#815a2b;
  --family-paper:linear-gradient(125deg,#fff8e9,#f1e3c9);
  --family-grain:url('/assets/images/ae3eecc3329110b3/waymark-surface-grain.svg');
  --family-border:#bea174;
  --family-shadow:0 3px 12px #64431e14,inset 0 1px #fffaf0;
}

/* Restore walnut ink on illustrated rooms that the first light pass retained
   as dark islands. Native photographs and their captions are not recolored. */
:root[data-theme=heirloom_light] :is(.family-tree-hero,.family-tree-map,.family-doorways>a,.family-entry,.family-reunion-link,.family-album-banner,.family-collection-banner,.chronicles-banner,.albums-hero,.family-values-banner,.reunion-hero,.church-family-hero) {
  --light-text:#3f2c1e;--light-muted:#705b44;--light-accent:#815a2b;
  color:var(--light-text);text-shadow:none;
}
:root[data-theme=heirloom_light] :is(.family-heading,.tree-heading,.family-section-heading,.chronicles-heading,.albums-heading,.rules-hero-copy,.resources-hero,.reunion-hero,.church-family-hero) {
  text-shadow:none;
}
:root[data-theme=heirloom_light] :is(.family-heading,.tree-heading) h1 { color:#3c281a!important; }
:root[data-theme=heirloom_light] :is(.family-kicker,.rules-kicker,.resources-kicker,.reunion-kicker,.church-eyebrow) {
  --light-text:#815a2b;color:var(--light-text)!important;
}
:root[data-theme=heirloom_light] :is(.family-heading>p,.tree-heading>p,.family-person small,.family-entry small,.family-reunion-link small,.album-cover-copy small,.church-muted,.church-boundary-note) {
  --light-text:#705b44;
}
:root[data-theme=heirloom_light] :is(.family-page,.resources-page,.church-family-page) :is(a,button,input,textarea,select):focus-visible {
  outline:3px solid #815a2b;outline-offset:3px;
}

/* Shared shelves, records and tools: lightly grained paper, honey brass edges. */
:root[data-theme=heirloom_light] :is(.family-begin,.family-person,.family-empty,.family-shelf-card,.family-shelf-caption,.family-resources-button,.church-card,.church-welcome,.church-companion,.church-home-calendar,.church-preview-note,.reunion-connect) {
  background:var(--family-grain),var(--family-paper)!important;
  border-color:#c4aa82!important;box-shadow:var(--family-shadow);
  --light-text:#3f2c1e;--light-muted:#705b44;--light-accent:#815a2b;
}
:root[data-theme=heirloom_light] :is(.reunion-paper,.fellowship-composer,.rules-invitation,.resources-growing,.chronicles-invitation,.family-values-banner,.reunion-welcome) {
  background:var(--family-grain),radial-gradient(ellipse at 30% 0%,#fff9eb,#f0dfbf)!important;
  border-color:#b89a68;box-shadow:var(--family-shadow);
  --light-text:#3f2c1e;--light-muted:#705b44;--light-accent:#815a2b;
}
:root[data-theme=heirloom_light] :is(.family-page,.church-family-page,.family-dialog,.church-dialog) :is(.family-gold,.reunion-gold,.rules-add),
:root[data-theme=heirloom_light] .fellowship-composer>button {
  background:linear-gradient(120deg,#f5dba5,#e4bc74 70%,#d5a75c)!important;
  border-color:#ad8345;box-shadow:inset 0 1px 1px #fff7da,0 2px 6px #7151241c;
  --light-text:#412b14;
}
:root[data-theme=heirloom_light] :is(.family-tabs,.church-tabs,.tree-view-switch,.reunion-spaces) {
  background:linear-gradient(#f2e8d5,#ebdcc0)!important;border-color:#c5ad87;box-shadow:inset 0 1px #fff9ea;
}
:root[data-theme=heirloom_light] :is(.family-tabs a[aria-current=page],.church-tabs a[aria-current=page],.tree-view-switch button[aria-pressed=true],.reunion-spaces button[aria-pressed=true],.family-album-filters button[aria-pressed=true],.reunion-filters button[aria-pressed=true],.fellowship-filters button[aria-pressed=true]) {
  background:linear-gradient(120deg,#f2d69e,#dfba78)!important;border-color:#ad8245;
  --light-text:#422c16;box-shadow:inset 0 1px #fff8d8;
}
:root[data-theme=heirloom_light] :is(.tree-search,.rules-search-wrap,.chronicles-search)>svg { color:#8a673b; }
:root[data-theme=heirloom_light] :is(.family-page,.resources-page,.church-family-page) :is(input,textarea)::placeholder {
  color:#78644b;opacity:1;
}
:root[data-theme=heirloom_light] :is(.family-initials,.family-entry-symbol,.reference-person-circle) {
  background:radial-gradient(circle at 35% 25%,#f9edcf,#d8bc88)!important;
  color:#74502a;--light-text:#74502a;border-color:#b99963;box-shadow:inset 0 1px #fff8e9;
}
:root[data-theme=heirloom_light] :is(.family-quick-stats,.family-shelf-week,.family-section-heading,.chronicle-read,.reunion-update-actions,.reunion-compose-tools,.church-card-actions) {
  border-color:#cfbb99;
}

/* Family entrance and tree. The tree artwork is decorative; the original
   overlaid branches remain actual buttons with their existing positions. */
:root[data-theme=heirloom_light] .family-page[data-family-page=family] .family-tree-hero {
  background:linear-gradient(90deg,#f8efdefa 0%,#f8efdee8 40%,#f8efde16 80%),url('/assets/images/169466bbae006d28/family-tree.png') 72% 48%/cover;
  border-color:#bda073;box-shadow:var(--family-shadow);min-height:155px;
}
:root[data-theme=heirloom_light] .family-hero-caption { background:none;max-width:75%;text-shadow:none; }
:root[data-theme=heirloom_light] .family-hero-caption h2 { color:#3f2c1e!important; }
:root[data-theme=heirloom_light] .family-explore {
  background:linear-gradient(#fff7e6,#e8d3ad)!important;border-color:#b89761;
  --light-text:#51391e;box-shadow:inset 0 1px #fffaf0;
}
:root[data-theme=heirloom_light] .family-page[data-family-page=family-linking] .family-tree-map {
  background:linear-gradient(#fff4db1a,#e8d3ac1a),url('/assets/images/169466bbae006d28/family-tree.png') 86% center/cover no-repeat #f0e2c7;
  border-color:#bda073;box-shadow:inset 0 0 0 3px #fff8e677,0 3px 12px #64431e14;
}
:root[data-theme=heirloom_light] .family-page[data-family-page=family-linking] .family-branch {
  background:linear-gradient(125deg,#fff9eefa,#eddbb8f7)!important;
  border-color:#b2905b;box-shadow:0 3px 8px #6e4c2629,inset 0 1px #fffdf2;
  --light-text:#432e19;
}
:root[data-theme=heirloom_light] .family-page[data-family-page=family-linking] .family-branch small { --light-text:#71512b; }
:root[data-theme=heirloom_light] .family-page[data-family-page=family-linking] .family-branch[aria-pressed=true] {
  background:linear-gradient(125deg,#f8e0ae,#dfb66f)!important;border-color:#8f682f;
  box-shadow:0 0 0 2px #fff9e2,0 0 0 4px #a17a3f88,0 4px 10px #78531d33;
}
:root[data-theme=heirloom_light] .tree-invite { border-color:#c6ac83;--light-text:#815a2b; }
:root[data-theme=heirloom_light] .family-doorways>a {
  border-color:#c2a57a;box-shadow:var(--family-shadow);background-color:#f1e2c6;
  background-image:linear-gradient(90deg,#faf1e0fa,#faf1e0ed 64%,#faf1e05c),url('/assets/images/6744aa5e883b6d23/light-chronicles.png');
}
:root[data-theme=heirloom_light] .family-doorways>.family-stories-door {
  background-image:linear-gradient(90deg,#faf1e0fa,#faf1e0eb 64%,#faf1e05c),url('/assets/images/a48dac4b2981343b/light-desk.webp');
}
:root[data-theme=heirloom_light] .family-doorways>.family-rules-door {
  background-image:linear-gradient(90deg,#faf1e0fa,#faf1e0ed 64%,#faf1e05c),url('/assets/images/169466bbae006d28/family-tree.png');
}
:root[data-theme=heirloom_light] .family-doorways>a svg,
:root[data-theme=heirloom_light] .family-reunion-link>svg { color:#886031; }
:root[data-theme=heirloom_light] .family-entry {
  background:var(--family-grain),var(--family-paper);border-color:#c0a174;box-shadow:var(--family-shadow);
}
:root[data-theme=heirloom_light] .family-reunion-link {
  background:linear-gradient(90deg,#fff7e6fa,#fff7e6ed 66%,#fff7e644),url('/assets/images/6f6d9abdb8e728ae/family-table.png') 80% center/cover;
  border-color:#baa071;box-shadow:var(--family-shadow);
}

/* Albums and Chronicles use an existing daylight album concept as decorative
   header artwork. Uploaded images, member portraits and sample labels survive. */
:root[data-theme=heirloom_light] :is(.chronicles-banner,.albums-banner,.family-album-banner,.family-collection-banner) {
  background:linear-gradient(90deg,#fff6e5ed,#fff6e5de 49%,#fff6e51a),url('/assets/images/6744aa5e883b6d23/light-chronicles.png') center 51%/cover;
  border-color:#bfa171;box-shadow:var(--family-shadow);--light-text:#432e1c;
}
:root[data-theme=heirloom_light] :is(.chronicles-banner,.albums-banner)>p { text-shadow:none; }
:root[data-theme=heirloom_light] .chronicles-search {
  background:linear-gradient(#fff9ee,#f4e7d0);border-color:#c1a57b;box-shadow:inset 0 1px #fff;
}
:root[data-theme=heirloom_light] .family-page[data-family-page=chronicles] .family-entry {
  background:var(--family-grain),radial-gradient(ellipse at 25% 0%,#fff8e8,#f0dfc0);
  border-color:#baa071;box-shadow:var(--family-shadow);--light-text:#3f2c1e;
}
:root[data-theme=heirloom_light] .chronicle-thumbnail { border-color:#c1a57b;box-shadow:0 2px 5px #62432026; }
:root[data-theme=heirloom_light] :is(.album-cover,.albums-leather-intro) {
  background:var(--family-grain),linear-gradient(120deg,#ead6b1,#d4b487 65%,#e7cda1);
  border-color:#a17b49;box-shadow:inset 0 0 0 3px #f9ebce,0 3px 10px #62432024;
  --light-text:#432c18;
}
:root[data-theme=heirloom_light] :is(.album-cover,.albums-leather-intro)::before { border-color:#a27a47; }
:root[data-theme=heirloom_light] .album-cover-stack small {
  background:#f9ecd2!important;--light-text:#51391d;border-color:#b18d58;
}
:root[data-theme=heirloom_light] .album-cover-placeholder { background:linear-gradient(135deg,#f8ecd2,#d8bc8c);color:#815a2c; }
:root[data-theme=heirloom_light] .family-photo-grid {
  background:var(--family-grain),linear-gradient(125deg,#f8edda,#ecdbbd);border-color:#aa8355;
  box-shadow:inset 0 0 0 1px #fff5dc,0 3px 10px #6a472219;
}
:root[data-theme=heirloom_light] .family-photo { background:#fff5e1;border-color:#d1b789;box-shadow:0 2px 6px #69451e26; }
:root[data-theme=heirloom_light] .family-photo small { --light-text:#513b23; }
:root[data-theme=heirloom_light] .albums-open-book {
  background:linear-gradient(90deg,#f9eedbe8,#f9eedbc9 48%,#f9eedb08 75%),url('/assets/images/6744aa5e883b6d23/light-chronicles.png') center/cover;
  border:1px solid #c3a77b;border-radius:10px;box-shadow:var(--family-shadow);
}
:root[data-theme=heirloom_light] .albums-book-copy { text-shadow:none;--light-text:#432e1b; }
:root[data-theme=heirloom_light] .reference-family-heading::before {
  background-image:linear-gradient(90deg,#f7efdeec,#f7efde80),url('/assets/images/246ba1eac1cce5cf/family-sunset-header.png');
}
:root[data-theme=heirloom_light] .reference-album-hero {
  background:linear-gradient(90deg,#f6e9d300 13%,#f6e9d333 43%,#f8eddbed 59%,#f8eddb 100%),url('/assets/images/6744aa5e883b6d23/light-chronicles.png') 35% center/cover;
  border-color:#bd9d6d;box-shadow:var(--family-shadow);--light-text:#432c1a;
}
:root[data-theme=heirloom_light] .reference-album-hero>small {
  background:#fff3dbd9;--light-text:#6b5032;border-radius:3px;padding:3px 5px;text-shadow:none;
}
:root[data-theme=heirloom_light] :is(.reference-room-grid>a,.reference-room-grid>button,.reference-library-empty) {
  background:var(--family-grain),var(--family-paper);border-color:#bda174;box-shadow:var(--family-shadow);
}
:root[data-theme=heirloom_light] .albums-compare { border-color:#cbb594; }
:root[data-theme=heirloom_light] .albums-compare button { background:#f3e7d0;border-color:#bda171;--light-text:#674a28; }
:root[data-theme=heirloom_light] .albums-compare button[aria-pressed=true] { background:#e6c68f;--light-text:#432e19; }

/* Rules: the writing surface and all editable entries retain their native UI. */
:root[data-theme=heirloom_light] .rules-hero {
  background:linear-gradient(90deg,#f7eddbfc,#f7eddbef 43%,#f7eddb22 86%),url('/assets/images/6f6d9abdb8e728ae/family-table.png') 75% center/cover;
  border-bottom:1px solid #d3bc93;
}
:root[data-theme=heirloom_light] .rules-values {
  background:var(--family-grain),var(--family-paper);border-color:#bba074;box-shadow:var(--family-shadow);
}
:root[data-theme=heirloom_light] .rules-values::after {
  background:linear-gradient(90deg,#faf0dcfa,#faf0dce8 52%,#faf0dc22);
}
:root[data-theme=heirloom_light] .rules-landscape img {
  position:absolute;right:0;bottom:-7%;width:45%;height:110%;object-fit:contain;object-position:right bottom;
}
:root[data-theme=heirloom_light] :is(.rules-flourish,.rules-search-wrap>svg,.rules-invitation>svg) { color:#8b642f; }

/* Community rooms share the new daylight family table candidate. */
:root[data-theme=heirloom_light] :is(.reunion-hero,.church-family-hero) {
  background:linear-gradient(90deg,#faf0ddfa,#faf0ddeb 55%,#faf0dd35),url('/assets/images/6f6d9abdb8e728ae/family-table.png') 70% center/cover;
  border-bottom:1px solid #ceb38b;text-shadow:none;
}
:root[data-theme=heirloom_light] .reunion-body .family-tabs a:first-child {
  background:linear-gradient(120deg,#f2d69e,#dfba78);--light-text:#422c16;box-shadow:inset 0 1px #fff8d8;
}
:root[data-theme=heirloom_light] :is(.reunion-update-actions button,.reunion-compose-tools button,.reunion-choose) {
  background:#f8ecd6!important;border-color:#c4a97b!important;--light-text:#624521;box-shadow:none;
}
:root[data-theme=heirloom_light] .reunion-update-actions button[aria-pressed=true] {
  background:#e4c68e!important;--light-text:#432e17;
}
:root[data-theme=heirloom_light] .reunion-sample-label {
  background:#ead7b5;--light-text:#72532d;border:1px solid #c5a574;
}
:root[data-theme=heirloom_light] .reunion-attachment button { --light-text:#80522a; }
:root[data-theme=heirloom_light] .church-card :is(small,.church-muted,.church-audience-label) { --light-text:#725a3d; }
:root[data-theme=heirloom_light] .church-card-actions button[data-church-action=remove] {
  background:transparent;border-color:#c4a481;--light-text:#8a392b;
}
:root[data-theme=heirloom_light] .church-card-actions button[data-church-action=edit] { background:transparent;--light-text:#80572c; }
:root[data-theme=heirloom_light] .church-calendar-days button {
  background:#fff4df;border-color:#ceb58a;--light-text:#4e351e;box-shadow:none;
}
:root[data-theme=heirloom_light] .church-calendar-days button[aria-pressed=true] {
  background:#735022;border-color:#735022;--light-text:#fff5de;box-shadow:inset 0 1px #b28a4f;
}
:root[data-theme=heirloom_light] .church-calendar-key button { background:transparent;--light-text:#73532c; }
:root[data-theme=heirloom_light] .church-priority--important { --light-text:#80582a; }
:root[data-theme=heirloom_light] .church-priority--urgent { --light-text:#9b3e28; }
:root[data-theme=heirloom_light] .church-prayer[data-priority=urgent][data-answered=false] { border-color:#b26b43!important; }
:root[data-theme=heirloom_light] .church-details { border-color:#c7ad84; }

/* Reading room: daylight desk at the entrance, related light family and writing
   illustrations in informational categories. Their Coming Soon state remains. */
:root[data-theme=heirloom_light] .resources-hero {
  background:linear-gradient(90deg,#f9efddfa,#f9efdde8 56%,#f9efdd2b),url('/assets/images/a48dac4b2981343b/light-desk.webp') 70% center/cover;
  border-bottom:1px solid #d4be98;
}
:root[data-theme=heirloom_light] .resource-category {
  background:#f1e2c7;border-color:#bfa173;box-shadow:var(--family-shadow);
}
:root[data-theme=heirloom_light] .resource-category::after {
  background:linear-gradient(90deg,#faf0ddfc,#faf0ddf5 60%,#faf0dd8a 82%,#faf0dd33);
}
:root[data-theme=heirloom_light] .resource-category-art img { width:100%;height:100%;object-fit:cover;display:block; }
:root[data-theme=heirloom_light] .resource-category-copy { text-shadow:none; }
:root[data-theme=heirloom_light] :is(.resource-category-icon,.resources-divider,.resources-closing>span,.resources-growing>span) { color:#8a642f; }
:root[data-theme=heirloom_light] .resource-coming {
  background:#f0dfbe;border-color:#baa06c;--light-text:#75552b;
}
:root[data-theme=heirloom_light] .resources-growing>div { border-color:#c2a477; }
:root[data-theme=heirloom_light] .resources-closing { --light-text:#7b6548;color:#7b6548; }

@media (max-width:355px) {
  :root[data-theme=heirloom_light] .family-hero-caption { max-width:85%; }
}
