/* Mobile Light Theme shared color foundation. All rules are scoped: dark and original
   artwork remain intact. Theme changes never choose or reorder a layout. */
:root[data-theme=heirloom_light]{
 color-scheme:light;--bg:#f7f3e8;--surface:#fffdf7;--ink:#30271f;--muted:#65574a;
 --gold:#90662b;--line:#b59b73;--soft-line:#ded0b9;--paper:#fffdf7;--paper-ink:#30271f;
 --theme-outer:#eae3d6;--theme-top:#fffdf7;--theme-panel:#fffdf7;--theme-edge:#c9b592;--theme-muted:#65574a;
 --light-text:#30271f;--light-muted:#65574a;--light-accent:#805b28;background:#eae3d6;
}
:root[data-theme=heirloom_light] body{background:radial-gradient(ellipse at top,#fffdf9,transparent 70%),#eae3d6;color:var(--ink)}
:root[data-theme=heirloom_light] .phone-shell{background:var(--bg)!important;border-color:#cbbb9f;box-shadow:0 14px 55px #59432418}
:root[data-theme=heirloom_light] :is(.app-header,.page-back-bar,#content,.reference-home .shelf-heading,.reference-home .shelf-actions,.scene-state,.chart-main,.waymark-editor,.waymark-top){background:var(--bg)!important;color:var(--ink)}
/* A single theme ink baseline keeps inherited legacy text readable. Illustrated
   islands below explicitly opt into their original cream-on-dark treatment. */
:root[data-theme=heirloom_light] :is(h1,h2,h3,h4,p,small,strong,span,a,label,summary,legend,button,input,textarea,select,blockquote,cite,dt,dd,li){color:var(--light-text)!important;text-shadow:none}
:root[data-theme=heirloom_light] :is(.preview-note,.editor-help,.family-local,.family-presence-note,.family-shelves-note,.home-note,.scene-hint,.date-line,.eyebrow,.entry-meta,.save-state,.reflection-speaking,.reflection-count,.appearance-setting p,.settings-section-note,.settings-section-label small,.bottom-menu-setting p,.family-form-help,.family-filter-empty,.family-tree-tip,.reunion-preview-note,.church-preview-note,.settings-section-note,.settings-coming,.family-quick-stats a,.family-shelf-week small,.theme-layout-note){--light-text:var(--light-muted)}
:root[data-theme=heirloom_light] :is(.brand,.brand span,.brand strong,.settings-brand,.back-link,.header-waymarks,.subtle-button,.family-text-button,.family-shelves-add,.shortcut-tools button,.doors-brand,.doors-brand strong,.doors-brand span,.settings-row-chevron,.settings-chevron,.settings-section-icon,.family-kicker,.family-resources-button){--light-text:var(--light-accent);color:var(--light-text)!important}
:root[data-theme=heirloom_light] :is(button,a,input,textarea,select,summary):focus-visible{outline:2px solid #805b28!important;outline-offset:4px}
:root[data-theme=heirloom_light] :is(input,textarea)::placeholder{color:#796b5c!important;opacity:1}
:root[data-theme=heirloom_light] .workbench-label{color:#6d6051}
:root[data-theme=heirloom_light] .preview-strip{background:#eee5d5!important;border-color:#d7c8af;color:#65574a;--light-text:#65574a}
:root[data-theme=heirloom_light] .status-dot{background:#93703b}
:root[data-theme=heirloom_light] :is(.bottom-nav,.bottom-nav.coordinated-nav){background:linear-gradient(#fffdf7f7,#f3ebdcfc)!important;border-color:#c9b592;box-shadow:0 -4px 20px #62462412;--light-text:#65574a}
:root[data-theme=heirloom_light] .bottom-nav a[aria-current=page]{background:#e8dcc5!important;--light-text:#523916}
:root[data-theme=heirloom_light] .unread-badge{--light-text:#fffdf7;background:#7b452d!important;border-color:#fffdf7!important}
:root[data-theme=heirloom_light] :is(.family-tabs,.family-album-filters button,.tree-view-switch,.tree-view-switch button,.reunion-filters button,.calendar-view-switch,.calendar-view-switch button,.reunion-spaces,.reunion-spaces button,.church-tabs,.fellowship-filters button,.chart-layout-picker,.chart-layout-picker button,.waymark-layout-picker button){background:#eee5d6!important;border-color:#c4ae88;box-shadow:none}
:root[data-theme=heirloom_light] :is(.family-tabs a[aria-current=page],.church-tabs a[aria-current=page],.family-album-filters button[aria-pressed=true],.tree-view-switch button[aria-pressed=true],.reunion-filters button[aria-pressed=true],.calendar-view-switch button[aria-pressed=true],.reunion-spaces button[aria-pressed=true],.fellowship-filters button[aria-pressed=true],.chart-layout-picker button[aria-pressed=true],.waymark-layout-picker button[aria-pressed=true]){background:#d9bd86!important;border-color:#a17b3f;--light-text:#30271f;box-shadow:inset 0 1px #fff8}
:root[data-theme=heirloom_light] :is(.entry-card,.room-link,.facts,.preview-note,.empty-state,.family-empty,.family-person,.family-shelf-card,.family-shelf-caption,.current-prayers,.church-card,.church-welcome,.church-companion,.church-home-calendar,.church-preview-note,.calendar-day-card,.calendar-anniversaries,.room-connection-link,.chart-course,.chart-companion,.chart-coming,.family-begin,.wisdom-options,.wisdom-room-copy,.theme-option,.shortcut-order li,.doors-order-card,.area-visibility-row,.settings-group,.settings-group-content,.shortcut-add,.shortcut-choice,.family-resources-button,.reunion-connect,.reunion-update-actions button){background:#fffdf7!important;border-color:#c9b592!important;box-shadow:0 2px 9px #60442408;color:var(--ink)}
:root[data-theme=heirloom_light] :is(.family-shelf-card,.current-prayers,.church-card,.entry-card){box-shadow:0 3px 14px #6248240a}
:root[data-theme=heirloom_light] :is(.family-shelf-caption,.entry-card .entry-bottom,.family-quick-stats,.settings-section,.settings-group-link,.settings-group-detail,.shelf-settings,.settings-sharing-note){border-color:#d3c1a3!important}
:root[data-theme=heirloom_light] .family-shelf-badge{background:#e3ebd7!important;border-color:#9faf86;--light-text:#425733}
:root[data-theme=heirloom_light] .family-online-indicator{--light-text:#42642e;color:#42642e}
:root[data-theme=heirloom_light] .family-online-dot{background:#4b7b35;box-shadow:none}
:root[data-theme=heirloom_light] :is(.family-initials,.family-entry-symbol,.keep-place-icon,.shortcut-card-icon){background:#f1e6d1!important;border-color:#b69a6d;box-shadow:none;color:#805b28;--light-text:#805b28}
:root[data-theme=heirloom_light] :is(.primary,.family-gold,.reunion-gold,.waymark-button,.prayer-prayed,.church-family-page button,.church-dialog button,.reflection-actions .primary,.editor-actions .primary,.fellowship-composer>button){background:#dec18a;border-color:#aa8247;box-shadow:inset 0 1px #fffc,0 2px 5px #68451f12;--light-text:#352715}
:root[data-theme=heirloom_light] :is(.small-button,.pill,.reference-home .pill,.waymark-memory button,.waymark-visibility button,#waymark-add-to,.keep-included,.keep-switch-row,.chart-starting-points button,.family-shelves-add,.reunion-compose-tools button,.reunion-choose,.shortcut-add button,.shortcut-add-actions button,.doors-order-footer button,.wisdom-add-button,.wisdom-own-item button,.theme-option:has(:checked)){background:#f4e9d5!important;border-color:#bda276!important;box-shadow:inset 0 1px #fff8;--light-text:#513b20}
:root[data-theme=heirloom_light] .pill.featured::after{opacity:.45}
:root[data-theme=heirloom_light] :is(.waymark-visibility button[aria-pressed=true],.chart-starting-points button[aria-pressed=true]){background:#dec18a!important;--light-text:#352715}
:root[data-theme=heirloom_light] :is(.editor,.reflection-composer,.prayer-paper,.calendar-paper,.reunion-paper,.fellowship-composer,.chart-begin,.waymark-writing-paper,.detail-paper){background:#fffdf7!important;border-color:#c8af86;box-shadow:0 4px 18px #6044240d;color:#30271f;--light-text:#30271f}
:root[data-theme=heirloom_light] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]),textarea,select){background:#fffaf0!important;color:#30271f!important;border-color:#c5ac83!important;box-shadow:none;--light-text:#30271f}
:root[data-theme=heirloom_light] :is(.waymark-date-control,.waymark-save-footer,.keep-dialog-header,.keep-dialog-footer,#waymark-keep-panel){background:#f2e8d8!important;border-color:#cfba98!important}
:root[data-theme=heirloom_light] :is(dialog,.family-dialog,.church-dialog,#keep-passage-dialog,#chart-course-dialog,.info-panel){background:#fffdf7!important;border-color:#bda276!important;color:#30271f;--light-text:#30271f;box-shadow:0 18px 70px #392b2740}
:root[data-theme=heirloom_light] dialog::backdrop{background:#30271f70;backdrop-filter:blur(3px)}
:root[data-theme=heirloom_light] :is(.family-dialog-close,#keep-dialog-close){background:#f2e8d8!important;border-color:#bda276;--light-text:#513b20}
:root[data-theme=heirloom_light] :is(.family-delete,.danger,[data-error=true]){--light-text:#8a3427}
:root[data-theme=heirloom_light] .family-portrait-banner:after{background:linear-gradient(0deg,#f7f3e8,transparent 40%)}
:root[data-theme=heirloom_light] .family-heading{padding-top:8px}
:root[data-theme=heirloom_light] .theme-picture-option{background:#fffdf7!important}
:root[data-theme=heirloom_light] .theme-picture-option:has(:checked){box-shadow:inset 0 0 0 1px #90662b;border-color:#90662b}
:root[data-theme=heirloom_light] .theme-selected{--light-text:#fffdf7;background:#805b28}
:root[data-theme=heirloom_light] .appearance-setting .theme-layout-note{font-size:12px}
:root[data-theme=heirloom_light] :is(.shortcut-order-card,.settings-section,.settings-wall-link){background:transparent!important}
:root[data-theme=heirloom_light] :is(.shortcut-drag-card,.doors-order-drag-card,.settings-drag-card){background:#fffdf7!important;box-shadow:0 12px 30px #30271f30;border-color:#a78349;--light-text:#30271f}
:root[data-theme=heirloom_light] :is(.shortcut-drop-line,.doors-order-drop-line,.settings-drop-line){background:white;box-shadow:0 0 0 1px #805b28,0 1px 5px #30271f50}
:root[data-theme=heirloom_light] :is(.family-destinations,.family-destinations a){background:#fffdf7!important;border-color:#d7c6ab}
:root[data-theme=heirloom_light] .family-destinations a:is(:hover,:focus-visible){background:#eee2cb!important}
:root[data-theme=heirloom_light] :is(.calendar-day,.calendar-blank){background:#fffdf7;border-color:#dfd1ba}
:root[data-theme=heirloom_light] .calendar-day.is-selected{background:#e4c890!important;--light-text:#30271f}
:root[data-theme=heirloom_light] :is(.doors-hero,.doors-subroom){background:transparent!important}
:root[data-theme=heirloom_light] .doors-subroom:hover{background:#ede3d1!important}
/* A dark theme-choice thumbnail remains an accurate preview of that choice. */
:root[data-theme=heirloom_light] :is(.theme-picture,.shade-card-preview){--light-text:#f6e7cc}
/* The original framed quotation is an artwork island; settings stay light. */
:root[data-theme=heirloom_light] .wisdom-page{background:none}
:root[data-theme=heirloom_light] .daily-wisdom-frame{--light-text:#3a2816}
:root[data-theme=heirloom_light] :is(.wisdom-quote-arrows button,.wisdom-quote-arrows button:hover){background:transparent!important;--light-text:#805b28}
:root[data-theme=heirloom_light] .reflection-composer .primary{--light-text:#352715}
@media(prefers-reduced-motion:reduce){:root[data-theme=heirloom_light] .pill.featured::after{animation:none}}
