/* Legado y gestión familiar: Family Tech claro. Sin cambios de acceso ni datos.
   Misma capa que el editor canónico para resolver sus reglas heredadas importantes. */
@layer humanity-legacy-editor {
html body #accountModal #familyView#familyView .hpx-profile.hpp {
 --hpp-bg:#f3f7fa!important;--hpp-card:#fff!important;--hpp-tile:#e4eff7!important;--hpp-ivory:#173453!important;
 --hpp-mute:#576e83!important;--hpp-mute-hi:#48667f!important;--hpp-gold:#286eaa!important;--hpp-ink:#286eaa!important;
 --hpp-gold-btn:#286eaa!important;--hpp-ink-btn:#fff!important;--hpp-line:#c5d6e4!important;--hpp-hair:#dce6ee!important;
 --hpp-card-line:#c5d6e4!important;--hpx-ink:#f3f7fa!important;--hpx-ink-2:#fff!important;--hpx-ink-3:#e4eff7!important;
 --hpx-ivory:#173453!important;--hpx-ivory-dim:#48667f!important;--hpx-mute:#576e83!important;
 --hpx-champagne:#286eaa!important;--hpx-champagne-hi:#235b85!important;--hpx-line:#c5d6e4!important;
 --hpx-champagne-a:#edf4f9!important;--hpx-champagne-line:#c5d6e4!important;
 --hpp-serif:Inter,system-ui,-apple-system,sans-serif!important;
 box-sizing:border-box!important;max-width:900px!important;padding:12px 16px 100px!important;
 color:#173453!important;background:#f3f7fa!important;color-scheme:light;
}
html body #accountModal #familyView#familyView .hpx-profile.hpp[data-hpp-tone="memorial"]{--hpp-ink:#73569e!important;}
html body #accountModal #familyView#familyView .hpx-profile.hpp[data-hpp-tone="unconnected"]{--hpp-ink:#1d7188!important;}
html body #accountModal #familyView#familyView:has(.hpx-profile-view.active),
html body #accountModal #familyView#familyView:has(.hpx-profile-view.active) .social-main,
html body #accountModal #familyView#familyView .account-view.hpx-profile-view {
 background:#f3f7fa!important;background-image:none!important;color:#173453!important;
}
html body #accountModal #familyView#familyView .hpp .hpp-header.hpx-cover{padding:16px 0 0!important;gap:0!important;background:none!important;}
html body #accountModal #familyView#familyView .hpp .hpp-ring{width:104px!important;height:104px!important;box-shadow:none!important;}
html body #accountModal #familyView#familyView .hpp .hpp-ring .hpx-portrait-initials{font:600 32px/1.2 system-ui!important;color:#48667f!important;}
html body #accountModal #familyView#familyView .hpp .hpp-name{font:650 clamp(26px,5vw,34px)/1.15 system-ui!important;margin:12px 0 0!important;letter-spacing:-.035em!important;}
html body #accountModal #familyView#familyView .hpp :is(.hpp-relline,.hpp-life,.hpp-memorial,.hpp-stats){font:400 13px/1.45 system-ui!important;margin:6px 0 0!important;}
html body #accountModal #familyView#familyView .hpp .hpp-life{color:#576e83!important;font-style:normal!important;}
html body #accountModal #familyView#familyView .hpp .hpp-actions{margin:14px auto 20px!important;max-width:440px!important;gap:8px!important;}
html body #accountModal #familyView#familyView .hpp .hpp-actions .hpx-btn{height:auto!important;min-height:44px!important;font:600 14px/1.35 system-ui!important;padding:10px 14px!important;border-radius:12px!important;}
html body #accountModal #familyView#familyView .hpp :is(.hpx-back,.hpp-outline,.hpx-btn--ghost){background:#fff!important;color:#235b85!important;border-color:#c5d6e4!important;box-shadow:none!important;}
html body #accountModal #familyView#familyView .hpp .hpx-btn--primary{background:#286eaa!important;color:#fff!important;box-shadow:none!important;}
html body #accountModal #familyView#familyView .hpp .hpp-content{background:#fff!important;border-radius:18px!important;}
html body #accountModal #familyView#familyView .hpp .hpp-chapter{padding:24px 16px 0!important;}
html body #accountModal #familyView#familyView .hpp .hpp-chapter-label{font:650 14px/1.3 system-ui!important;letter-spacing:0!important;text-transform:none!important;}
html body #accountModal #familyView#familyView .hpp .hpp-numeral{font:600 14px/1.3 system-ui!important;}
html body #accountModal #familyView#familyView .hpp .hpp-timeline{margin-top:18px!important;gap:22px!important;padding-left:34px!important;}
html body #accountModal #familyView#familyView .hpp .hpp-timeline::before{left:10px!important;}
html body #accountModal #familyView#familyView .hpp .hpp-dot{left:-29px!important;width:12px!important;height:12px!important;}
html body #accountModal #familyView#familyView .hpp .hpp-year{font:650 30px/1.1 system-ui!important;}
html body #accountModal #familyView#familyView .hpp .hpp-moment-title{font:600 18px/1.3 system-ui!important;}
html body #accountModal #familyView#familyView .hpp :is(.hpp-note,.hpp-meta,.hpp-excerpt){font-size:14px!important;line-height:1.5!important;}
html body #accountModal #familyView#familyView .hpp .hpp-fam-grid{display:flex!important;gap:12px!important;overflow-x:auto!important;padding:4px 0 8px!important;}
html body #accountModal #familyView#familyView .hpp .hpp-fam{flex:0 0 90px!important;padding:6px 2px!important;border:0!important;background:none!important;gap:6px!important;}
html body #accountModal #familyView#familyView .hpp .hpp-fam-ring .hpx-portrait-initials{color:#48667f!important;}
html body #accountModal #familyView#familyView .hpp .hpp-fam-name{font-size:12px!important;}
html body #accountModal #familyView#familyView .hpp .hpp-recorrido{margin:24px 16px 0!important;padding:12px!important;background:#edf4f9!important;gap:10px!important;}
html body #accountModal #familyView#familyView .hpp .hpp-room{padding:10px!important;min-height:64px!important;background:#fff!important;}
html body #accountModal #familyView#familyView .hpp .hpp-person-tools{padding:0 16px!important;margin-top:16px!important;}
html body #accountModal #familyView#familyView .hpp :is(.humanity-person-state-card,.mi-huella-v1,.hpp-inline-editor,.hpp-native-editor,.humanidad-combobox-popover,.combobox-search-wrap,.combobox-options-list){background:#fff!important;color:#173453!important;border-color:#c5d6e4!important;box-shadow:none!important;}
html body #accountModal #familyView#familyView .hpp .humanity-person-state-card :is(p,summary){color:#576e83!important;}
html body #accountModal #familyView#familyView .hpp .mi-huella-v1 :is(summary,summary>svg,label,article h3){color:#173453!important;}
html body #accountModal #familyView#familyView .hpp .mi-huella-v1 p{color:#576e83!important;}
html body #accountModal #familyView#familyView .hpp :is(input,select,textarea,.combobox-search-input){background:#f7fafd!important;color:#173453!important;border-color:#b6ccde!important;color-scheme:light!important;}
html body #accountModal #familyView#familyView .hpp .mi-huella-v1 button{min-height:44px!important;background:#edf4f9!important;color:#235b85!important;border-color:#c5d6e4!important;}
html body #accountModal #familyView#familyView .hpp .profile-footprint-editor>summary{color:#286eaa!important;min-height:44px!important;}
html body #accountModal #familyView#familyView .hpp .hpp-inline-editor :is(.family-field-label,.ht-section-title,.hpp-editor-person,.hpp-editor-head h2,.combobox-option-name){color:#173453!important;}
html body #accountModal #familyView#familyView .hpp :is(button,a,input,select,textarea,summary):focus-visible{outline:2px solid #286eaa!important;outline-offset:2px!important;}
html body:has(#familyView .hpx-profile-view.active) #humanidadMobileFixedBar.social-nav{background:#fff!important;border-color:#c5d6e4!important;box-shadow:none!important;}
html body:has(#familyView .hpx-profile-view.active) #humanidadMobileFixedBar.social-nav button{color:#576e83!important;background:transparent!important;}

html body #accountModal #familyView#familyView .hpp .profile-footprint-editor{box-sizing:border-box!important;min-width:0!important;width:100%!important;max-width:100%!important;}
html body #accountModal #familyView#familyView .hpp .profile-footprint-editor>form{box-sizing:border-box!important;min-width:0!important;width:100%!important;max-width:100%!important;}
html body #accountModal #familyView#familyView .hpp .profile-footprint-editor>summary{white-space:normal!important;overflow-wrap:anywhere!important;}
html body #accountModal #familyView#familyView .hpp .mi-huella-v1 form>label{white-space:normal!important;overflow-wrap:anywhere!important;}
html body #accountModal #familyView#familyView .hpp .hpp-native-editor{background:transparent!important;}
html body #accountModal #familyView#familyView .hpp .mi-huella-v1 select{appearance:none!important;-webkit-appearance:none!important;inline-size:100%!important;min-inline-size:0!important;overflow:hidden!important;text-overflow:ellipsis!important;padding-right:28px!important;background-image:linear-gradient(45deg,transparent 50%,#576e83 50%),linear-gradient(135deg,#576e83 50%,transparent 50%)!important;background-position:calc(100% - 16px) 50%,calc(100% - 12px) 50%!important;background-size:4px 4px!important;background-repeat:no-repeat!important;}
html body .hfr-dialog .hfr-close{background:#edf4f9!important;color:#235b85!important;border-color:#c5d6e4!important;min-height:44px!important;}
html body .hfr-dialog .hfr-eyebrow{color:#576e83!important;}
html body .hfr-dialog .hfr-relation strong{color:#173453!important;}
html body #accountModal #familyView#familyView .hpp .humanity-person-state-heading span{color:#576e83!important;}
/* Gestionar persona mantiene sus controles nativos y las confirmaciones. */
html body .hfr-dialog{--hfr-paper:#fff!important;--hfr-night:#f3f7fa!important;--hfr-ink:#173453!important;--hfr-muted:#576e83!important;--hfr-border:#c5d6e4!important;--hfr-gold:#286eaa!important;--hfr-radius:12px!important;background:#fff!important;color:#173453!important;border-color:#c5d6e4!important;box-shadow:0 16px 56px #17345326!important;color-scheme:light!important;}
html body .hfr-dialog :is(.hfr-head,.hfr-body,.hfr-footer){background:#fff!important;background-image:none!important;border-color:#c5d6e4!important;box-shadow:none!important;padding:16px!important;}
html body .hfr-dialog .hfr-head::before,html body .hfr-dialog .hfr-head::after{content:none!important;}
html body .hfr-dialog :is(h2,h3){font-family:system-ui!important;color:#173453!important;}
html body .hfr-dialog .hfr-head h2{font-size:24px!important;margin-top:8px!important;}
html body .hfr-dialog :is(p,small,.hfr-lead,.hfr-counts){color:#576e83!important;}
html body .hfr-dialog :is(.hfr-id,.hfr-kicker){color:#235b85!important;background:#edf4f9!important;border-color:#c5d6e4!important;}
html body .hfr-dialog .hfr-actions{gap:8px!important;margin:12px 0!important;}
html body .hfr-dialog .hfr-action{grid-template-columns:minmax(0,1fr)!important;min-height:70px!important;gap:4px!important;padding:12px 42px 12px 14px!important;background:#f7fafd!important;background-image:none!important;border-color:#c5d6e4!important;box-shadow:none!important;}
html body .hfr-dialog .hfr-action::before{content:none!important;}
html body .hfr-dialog .hfr-action h3{font:600 16px/1.3 system-ui!important;margin-bottom:4px!important;}
html body .hfr-dialog .hfr-action p{font-size:13px!important;line-height:1.4!important;}
html body .hfr-dialog .hfr-button{background:#edf4f9!important;color:#235b85!important;border-color:#b6ccde!important;box-shadow:none!important;min-height:44px!important;}
html body .hfr-dialog .hfr-primary{background:#286eaa!important;color:#fff!important;}
html body .hfr-dialog .hfr-action .hfr-button{background:transparent!important;color:transparent!important;border:0!important;}
html body .hfr-dialog .hfr-action .hfr-button::after{border-color:#286eaa!important;}
html body .hfr-dialog .hfr-secondary-actions{border-top:1px solid #dce6ee!important;margin-top:16px!important;padding-top:4px!important;}
html body .hfr-dialog .hfr-secondary-actions .hfr-action{background:#fff!important;border-color:#dce6ee!important;}
html body .hfr-dialog :is(.hfr-notice,.hfr-protected,.hfr-relation,.hfr-relations,.hfr-selected,.hfr-isolation){background:#edf4f9!important;background-image:none!important;color:#173453!important;border-color:#c5d6e4!important;box-shadow:none!important;}
html body .hfr-dialog .hfr-notice[data-tone="error"]{background:#fff2ef!important;color:#91382c!important;border-color:#d9a196!important;}
html body .hfr-dialog :is(input,select,textarea){background:#f7fafd!important;color:#173453!important;border-color:#b6ccde!important;}
html body .hfr-dialog :focus-visible{outline:2px solid #286eaa!important;outline-offset:2px!important;}
}

/* Los editores de Ficha conservan la misma paleta al abrir sus controles. */
@layer humanity-legacy-editor {
  html body #accountModal #familyView#familyView .hpp .hpp-ficha-row > dt {
    color: #576e83 !important;
  }
  html body #accountModal #familyView#familyView .hpp .hpp-native-editor .family-field-wrap,
  html body #accountModal #familyView#familyView .hpp .hpp-ficha-row > dd {
    color: #173453 !important;
  }
  html body #accountModal #familyView#familyView .hpp :is(.hpp-inline-cancel, .hpp-place-go, .hpp-editor-close) {
    color: #235b85 !important;
  }
  html body #accountModal #familyView#familyView .hpp .hpp-native-editor :is(.humanidad-combobox-trigger, .combobox-option, .ht-datepicker-popup) {
    background: #f7fafd !important;
    color: #173453 !important;
    border-color: #b6ccde !important;
    box-shadow: none !important;
  }
  html body #accountModal #familyView#familyView .hpp .hpp-native-editor :is(.combobox-option:is(:hover,.selected,.is-focused), .combobox-trigger-avatar, .combobox-option-avatar) {
    background: #e4eff7 !important;
    color: #235b85 !important;
  }
  html body #accountModal #familyView#familyView .hpp .hpp-native-editor :is(.combobox-trigger-name, .combobox-option-name, .combobox-trigger-chevron) {
    color: #173453 !important;
  }
  html body #accountModal #familyView#familyView .hpp .hpp-native-editor :is(.combobox-trigger-role, .combobox-option-context),
  html body #accountModal #familyView#familyView .hpp .hpp-native-editor input::placeholder {
    color: #576e83 !important;
    opacity: 1 !important;
  }
  html body #accountModal #familyView#familyView .hpp .hpp-native-editor input[type="date"] {
    -webkit-text-fill-color: #173453 !important;
  }
  html body #accountModal #familyView#familyView .hpp .hpp-native-editor input[type="date"]::-webkit-datetime-edit {
    color: #173453 !important;
    -webkit-text-fill-color: currentColor !important;
  }
  html body #accountModal #familyView#familyView .hpp .hpp-native-editor #drawerSaveBtn {
    background: #235b85 !important;
    color: #fff !important;
  }
  html body #accountModal #familyView#familyView .hpp .hpp-native-editor #drawerSaveBtn:disabled {
    background: #e4eff7 !important;
    color: #576e83 !important;
  }
  html body #accountModal #familyView#familyView .hpp :is(.hpp-place, .hpp-place-icon, .hpp-photo-skel, .hpp-quote, .hpp-ficha-editor-slot .hfr-button) {
    background: #edf4f9 !important;
    color: #173453 !important;
    border-color: #c5d6e4 !important;
  }
  html body #accountModal #familyView#familyView .hpp :is(.hpp-place-name, .hpp-place-sub, .hpp-quote) {
    color: #48667f !important;
  }
}

@layer humanidad-family-tech-dialogs {
  /* Estas ventanas se montan fuera de Legado y de Mi perfil. */
  html body[class] [data-humanidad-unsaved-dialog] > .person-drawer.new-branch-modal.hafv2-discard,
  html body[class] .humanidad-modal-backdrop.hafv2-backdrop > .person-drawer.new-branch-modal.hafv2-card,
  html body[class] .humanidad-modal-backdrop.hafv2-backdrop > #humanidad-share-invite-dialog.person-drawer.hafv2-card {
    background: #fff !important;
    color: #173453 !important;
    border-color: #c5d6e4 !important;
    box-shadow: 0 16px 56px #17345340 !important;
    color-scheme: light;
  }
  html body[class] [data-humanidad-unsaved-dialog] > .person-drawer.hafv2-discard h3 {
    color: #173453 !important;
    font: 600 19px/1.3 system-ui, sans-serif !important;
  }
  html body[class] [data-humanidad-unsaved-dialog] > .person-drawer.hafv2-discard .account-action.secondary {
    background: #235b85 !important;
    color: #fff !important;
  }
  html body[class] [data-humanidad-unsaved-dialog] > .person-drawer.hafv2-discard .account-action.danger {
    background: #fff !important;
    color: #8b3344 !important;
    border: 1px solid #c5d6e4 !important;
  }
  html body[class] .humanidad-modal-backdrop.hafv2-backdrop .person-drawer.hafv2-card :is(.new-branch-modal-header, .new-branch-modal-body, .new-branch-modal-footer) {
    background: #fff !important;
    border-color: #c5d6e4 !important;
    color: #173453 !important;
  }
  html body[class] .humanidad-modal-backdrop.hafv2-backdrop .person-drawer.hafv2-card :is(h3, label, legend, .humanidad-compact-name, .new-branch-step, .humanidad-quick-other) {
    color: #173453 !important;
  }
  html body[class] .humanidad-modal-backdrop.hafv2-backdrop .person-drawer.hafv2-card :is(p, small, .account-kicker, .account-status, .humanidad-compact-live, .hafv2-outside-hint, .new-branch-safe-note, .humanidad-compact-copy) {
    color: #576e83 !important;
  }
  html body[class] .humanidad-modal-backdrop.hafv2-backdrop .person-drawer.hafv2-card :is(input:not([type="checkbox"],[type="radio"]), select, textarea, .humanidad-quick-relation-chip, .new-branch-modal-close, .person-drawer-close, .ht-drawer-close, .new-branch-coparent, .hafv2-link-row, .hafv2-copy, .humanidad-compact-hid, .humanidad-easy-saved-secondary, .account-action.secondary) {
    background: #f7fafd !important;
    color: #235b85 !important;
    border-color: #b6ccde !important;
    box-shadow: none !important;
  }
  html body[class] .humanidad-modal-backdrop.hafv2-backdrop .person-drawer.hafv2-card :is(input,textarea)::placeholder {
    color: #576e83 !important;
    opacity: 1 !important;
  }
  html body[class] .humanidad-modal-backdrop.hafv2-backdrop .person-drawer.hafv2-card .humanidad-quick-relation-chip.is-active {
    background: #e4eff7 !important;
    border-color: #235b85 !important;
    color: #173453 !important;
  }
  html body[class] .humanidad-modal-backdrop.hafv2-backdrop .person-drawer.hafv2-card :is(#branchSaveBtn, .humanidad-easy-saved-primary, .account-action:not(.secondary,.danger)) {
    background: #235b85 !important;
    color: #fff !important;
    border-color: #235b85 !important;
    box-shadow: none !important;
  }
  html body[class] .humanidad-modal-backdrop.hafv2-backdrop .person-drawer.hafv2-card #branchSaveBtn:disabled {
    background: #e4eff7 !important;
    color: #576e83 !important;
    border-color: #c5d6e4 !important;
    opacity: 1 !important;
  }
  html body[class] .humanidad-modal-backdrop.hafv2-backdrop .person-drawer.hafv2-card :is(details.humanidad-compact-optional[open], .humanidad-compact-optional summary, .humanidad-compact-link) {
    color: #235b85 !important;
    border-color: #c5d6e4 !important;
  }
  html body[class] .humanidad-modal-backdrop.hafv2-backdrop .person-drawer.hafv2-card .humanidad-compact-link {
    background: transparent !important;
  }
  html body[class] .humanidad-modal-backdrop.hafv2-backdrop > #humanidad-share-invite-dialog.person-drawer.hafv2-card :is(.new-branch-modal-header,.new-branch-modal-footer) {
    background: #fff !important;
  }
}

/* Familia, incluidas las tarjetas que aparecen después de desplegar la tarea. */
html body #accountModal #familyView#familyView .account-view[data-view="connections"] .hrc-page-frame {
  color: #173453 !important;
  color-scheme: light;
}
html body #accountModal #familyView#familyView .account-view[data-view="connections"] :is(.social-head,.family-list-head,.family-task, .connection-privacy-note, .connection-card, .family-entry-card) {
  background: #fff !important;
  color: #173453 !important;
  border-color: #c5d6e4 !important;
  box-shadow: none !important;
}
html body #accountModal #familyView#familyView .account-view[data-view="connections"] :is(h2,h3,strong,.account-field) {
  color: #173453 !important;
}
html body #accountModal #familyView#familyView .account-view[data-view="connections"] :is(p,small,.account-kicker,.account-status) {
  color: #576e83 !important;
}
html body #accountModal #familyView#familyView .account-view[data-view="connections"] :is(.account-field,.account-action.secondary,.family-task > summary,.family-entry-mark,.family-privacy-icon) {
  background: #edf4f9 !important;
  color: #235b85 !important;
  border-color: #b6ccde !important;
  box-shadow: none !important;
}
html body #accountModal #familyView#familyView .account-view[data-view="connections"] .account-field::placeholder {
  color: #576e83 !important;
}

/* Panel del mapa y sus tarjetas de región, lugar y rutas. */
html body #accountModal #familyView#familyView .account-view[data-view="mundo"] .mp-panel {
  --mp-ivory: #173453 !important;
  --mp-muted: #576e83 !important;
  --mp-gold: #235b85 !important;
  --mp-line: #b6ccde !important;
  --mp-line-soft: #c5d6e4 !important;
  background: #fff !important;
  border-color: var(--mp-line-soft) !important;
  color: var(--mp-ivory) !important;
  color-scheme: light;
  box-shadow: 0 12px 34px #17345338 !important;
}
html body #accountModal #familyView#familyView .account-view[data-view="mundo"] .mp-panel :is(.mp-panel-title, strong, b) {
  color: #173453 !important;
}
html body #accountModal #familyView#familyView .account-view[data-view="mundo"] .mp-panel :is(small,.mp-panel-sub,.mp-panel-route span,.mp-place-list-note) {
  color: #576e83 !important;
}
html body #accountModal #familyView#familyView .account-view[data-view="mundo"] .mp-panel :is(.mp-panel-person,.mp-panel-close,.mp-panel-route,.mp-panel-history-contract,.mp-panel-badge) {
  background: #edf4f9 !important;
  color: #235b85 !important;
  border-color: #c5d6e4 !important;
}
html body #accountModal #familyView#familyView .account-view[data-view="mundo"] .mp-panel :is(.mp-panel-route,.mp-panel-close):is(:hover,:focus-visible) {
  background: #e4eff7 !important;
  border-color: #235b85 !important;
}

/* El editor de la cuenta también conserva una superficie clara al abrirse. */
html body #accountModal #familyView#familyView .account-view[data-view="profile"] #profileV50Editor {
  color-scheme: light;
}
html body #accountModal #familyView#familyView .account-view[data-view="profile"] #profileV50Editor :is(input, textarea, select, .profile-v2-media-change:not(.profile-v2-media-preview)) {
  background: #f7fafd !important;
  color: #173453 !important;
  border-color: #b6ccde !important;
}
html body #accountModal #familyView#familyView .account-view[data-view="profile"] #profileV50Editor :is(input,textarea)::placeholder {
  color: #576e83 !important;
}

html body #accountModal #familyView#familyView .account-view[data-view="mundo"] .mp-header .mp-layers {
  background: #f3f7fa !important;
  border-color: #c5d6e4 !important;
}
html body #accountModal #familyView#familyView .account-view[data-view="mundo"] .mp-header .mp-layer-btn {
  color: #235b85 !important;
}
html body #accountModal #familyView#familyView .account-view[data-view="mundo"] .mp-header .mp-layer-btn[aria-pressed="true"] {
  background: #e4eff7 !important;
  box-shadow: inset 0 0 0 1px #b6ccde !important;
}

/* Las listas y avisos que aparecen después de editar también deben ser legibles. */
@layer humanity-legacy-editor {
  html body #accountModal #familyView#familyView .hpp .hpp-native-editor :is(fieldset, .pp-section) {
    background: #f7fafd !important;
    border-color: #c5d6e4 !important;
  }
  html body #accountModal #familyView#familyView .hpp .hpp-native-editor :is(.account-status, fieldset legend) {
    color: #48667f !important;
  }
  html body #accountModal #familyView#familyView .hpp .hpp-native-editor .hlp-dropdown {
    background: #fff !important;
    color: #173453 !important;
    border-color: #b6ccde !important;
    box-shadow: 0 8px 24px #17345326 !important;
  }
  html body #accountModal #familyView#familyView .hpp .hpp-native-editor .hlp-option strong {
    color: #173453 !important;
  }
  html body #accountModal #familyView#familyView .hpp .hpp-native-editor :is(.hlp-status,.hlp-option small) {
    color: #576e83 !important;
  }
  html body #accountModal #familyView#familyView .hpp .hpp-native-editor .hlp-option:is(:hover,.hlp-active) {
    background: #e4eff7 !important;
    color: #173453 !important;
  }
  html body #accountModal #familyView#familyView .hpp :is(.hpp-invitation-panel,.ht-invite-result) {
    background: #f7fafd !important;
    color: #173453 !important;
    border-color: #c5d6e4 !important;
  }
}

@layer humanidad-family-tech-dialogs {
  html body [data-humanity-add-relative-review-v1] > section {
    background: #fff !important;
    color: #173453 !important;
    border-color: #c5d6e4 !important;
    box-shadow: 0 16px 56px #17345340 !important;
  }
  html body [data-humanity-add-relative-review-v1] > section :is(small,p,article > div > div) {
    color: #576e83 !important;
  }
  html body [data-humanity-add-relative-review-v1] > section :is(button,article,section > div) {
    border-color: #c5d6e4 !important;
  }
  html body [data-humanity-add-relative-review-v1] > section button {
    background: #edf4f9 !important;
    color: #235b85 !important;
  }
  html body [data-humanity-add-relative-review-v1] > section > div > button:last-child {
    background: #235b85 !important;
    color: #fff !important;
  }
  html body[class] .humanidad-modal-backdrop.hafv2-backdrop .person-drawer.hafv2-card .humanidad-compact-hid::before {
    color: #576e83 !important;
  }
}

/* El selector de parentesco coloca sus resultados directamente bajo body. */
@layer humanidad-family-tech-dialogs {
  html body:has(#familyView .hpx-profile-view.active .hpp-native-editor) > .humanidad-combobox-popover,
  html body:has(#familyView .hpx-profile-view.active .hpp-native-editor) > .humanidad-combobox-popover :is(.combobox-search-wrap,.combobox-options-list) {
    background: #fff !important;
    color: #173453 !important;
    border-color: #b6ccde !important;
  }
  html body:has(#familyView .hpx-profile-view.active .hpp-native-editor) > .humanidad-combobox-popover :is(.combobox-search-input,.combobox-option) {
    background: #f7fafd !important;
    color: #173453 !important;
    border-color: #b6ccde !important;
    color-scheme: light;
  }
  html body:has(#familyView .hpx-profile-view.active .hpp-native-editor) > .humanidad-combobox-popover :is(.combobox-option:is(:hover,.selected,.is-focused),.combobox-option-avatar) {
    background: #e4eff7 !important;
    color: #235b85 !important;
  }
  html body:has(#familyView .hpx-profile-view.active .hpp-native-editor) > .humanidad-combobox-popover :is(.combobox-option-name,.combobox-check) {
    color: #173453 !important;
  }
  html body:has(#familyView .hpx-profile-view.active .hpp-native-editor) > .humanidad-combobox-popover :is(.combobox-no-results,.combobox-option-context,.combobox-search-icon),
  html body:has(#familyView .hpx-profile-view.active .hpp-native-editor) > .humanidad-combobox-popover .combobox-search-input::placeholder {
    color: #576e83 !important;
    opacity: 1 !important;
  }
}
