/* Antique rose-gold edges, using the dark theme's fine metallic-rim treatment.
   Scope is the light UI only; artwork and the approved animation are untouched. */
:root[data-theme=heirloom_light] {
 --rose-gold-edge:#b18478;
 --rose-gold-highlight:#fae6db;
 --rose-gold-focus:#86564d;
 --rose-gold-rim:linear-gradient(118deg,#885c53 0%,#c69483 9%,#fae7dc 17%,#aa7569 29%,#dfb4a0 43%,#8e6056 56%,#fae1d1 72%,#bc8d7a 84%,#edd0bc 94%,#8d6056 100%);
 --rose-button-shadow:inset 0 0 0 1px #c8998a,inset 0 2px 0 #fae6db,0 1px 3px #6a42321c;
}

/* Include native buttons, live link-buttons and the labels inside full-card
   links. Inset edges also cover borderless icon buttons without resizing them. */
:root[data-theme=heirloom_light] body :is(
 #waymark-add-to,button,input[type=button],input[type=submit],input[type=reset],[role=button],
 .waymark-button,.primary,.secondary,.pill,.small-button,.subtle-button,
 .family-gold,.reunion-gold,.family-shelves-add,.family-resources-button,.family-text-button,
 .wisdom-open,.compact-card-action,.card-action,
 .family-tabs a,.church-tabs a,.filter-tabs a,.bottom-nav a[aria-current=page]
) {
 border-color:var(--rose-gold-edge)!important;
 box-shadow:var(--rose-button-shadow)!important;
}

/* Existing safe rim pseudo-elements keep their geometry, mask and radius. */
:root[data-theme=heirloom_light] :is(.reference-home,.waymark-button,.wisdom-room,.shelf-daily-wisdom) {
 --shelf-rim:var(--rose-gold-rim);
}
:root[data-theme=heirloom_light] body[data-page=shelf][data-shelf-layout=reference] {
 --reference-edge:var(--rose-gold-edge);
}
/* Match the dark Shelf's metallic-rim width on the complete card targets and
   their inset action labels. The old illustrated-layout CSS hid these rims. */
:root[data-theme=heirloom_light] body[data-page=shelf] :is(
 .shelf-actions .pill,
 .shelf-shortcuts .illustrated-card,.shelf-shortcuts .illustrated-wide,
 .shelf-shortcuts .wide-card,.shelf-shortcuts .shelf-daily-wisdom,
 .shelf-shortcuts .wisdom-open,.shelf-shortcuts .compact-card-action,
 .family-resources-footer .family-resources-button
) {position:relative}
:root[data-theme=heirloom_light] body[data-page=shelf] :is(
 .shelf-actions .pill,
 .shelf-shortcuts .illustrated-card,.shelf-shortcuts .illustrated-wide,
 .shelf-shortcuts .wide-card,.shelf-shortcuts .shelf-daily-wisdom,
 .shelf-shortcuts .wisdom-open,.shelf-shortcuts .compact-card-action,
 .family-resources-footer .family-resources-button
)::before {
 content:"";display:block!important;position:absolute;inset:0;z-index:2;
 padding:1.3px;border-radius:inherit;pointer-events:none;
 background:var(--rose-gold-rim);
 -webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
 -webkit-mask-composite:xor;
 mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
 mask-composite:exclude;
}

/* Shelf/room cards are the large button targets in the dark layout. Change
   their edge color while preserving their image, shadow and border geometry. */
:root[data-theme=heirloom_light] body :is(
 .reference-shelf-cards .illustrated-card,.reference-shelf-cards .illustrated-wide,
 .reference-shelf-cards .family-card,.reference-shelf-cards .shelf-daily-wisdom,
 .reference-shelf-cards .shortcut-card,.compact-shelf-cards>a,
 .room-link,.room-connection-link,.wisdom-room,.doors-room
) {border-color:var(--rose-gold-edge)!important}

:root[data-theme=heirloom_light] body :is(
 #waymark-add-to,button,.waymark-button,.primary,.secondary,.pill,.small-button,
 .family-gold,.reunion-gold,.family-shelves-add,.family-resources-button
):not(:disabled):hover {border-color:var(--rose-gold-focus)!important}

/* Keep keyboard focus distinct from the permanent decorative outline. */
:root[data-theme=heirloom_light] body :is(button,a,input,textarea,select,summary):focus-visible {
 outline:2px solid var(--rose-gold-focus)!important;
 outline-offset:4px;
}

/* Raised gold Good News cross, matching the selected middle reference. Effects are independent
   of the approved Shelf animation and do not change the button's behavior. */
:root[data-theme=heirloom_light] body .shelf-actions .salvation-cross {
 width:18px;height:26px;flex-shrink:0;overflow:visible;
 fill:none;stroke:none;pointer-events:none;
 filter:drop-shadow(.5px 1.4px 1px #69390566) drop-shadow(0 0 3px #ebb04a80);
}
:root[data-theme=heirloom_light] .salvation-cross .cross-metal {
 fill:url(#light-good-news-metal);stroke:#85480e;stroke-width:.55;stroke-linejoin:miter;
}
:root[data-theme=heirloom_light] .salvation-cross .cross-depth {fill:#8b490e;stroke:none}
:root[data-theme=heirloom_light] .salvation-cross .cross-face {fill:url(#light-good-news-face);stroke:none}
:root[data-theme=heirloom_light] .salvation-cross .cross-bevel {fill:#fff1b8;stroke:none;opacity:.9}
:root[data-theme=heirloom_light] .salvation-cross .cross-bevel-shadow {fill:#8b4810;stroke:none;opacity:.7}
:root[data-theme=heirloom_light] .salvation-cross .cross-glint {
 fill:#fff9ee;stroke:none;opacity:.45;
 animation:light-cross-sparkle 5.8s ease-in-out infinite;
}
:root[data-theme=heirloom_light] .salvation-cross .cross-glint-arm {animation-delay:-2.9s}
@keyframes light-cross-sparkle {
 0%,35%,70%,100% {opacity:.2}
 49% {opacity:1}
 58% {opacity:.45}
}
@media (prefers-reduced-motion:reduce) {
 :root[data-theme=heirloom_light] .salvation-cross .cross-glint {animation:none;opacity:.75}
}
