/* JL-inMemorie V14.60 - Família premium + árvore genealógica responsiva */
.pm-family-v2{position:relative;overflow:hidden;background:
  radial-gradient(circle at 92% 8%,rgba(49,142,217,.08),transparent 17rem),
  linear-gradient(145deg,#ffffff 0%,#f8fbff 100%);border-color:#d5e4f1}
.pm-family-v2:after{content:"";position:absolute;right:-28px;top:-18px;width:210px;height:210px;opacity:.22;pointer-events:none;background:
 radial-gradient(circle at 30% 35%,rgba(74,151,209,.18) 0 6px,transparent 7px),
 linear-gradient(120deg,transparent 47%,rgba(81,159,218,.16) 48% 49%,transparent 50%)}
.pm-family-v2-head{position:relative;z-index:1;display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:24px}
.pm-family-v2-head h2{font-size:clamp(25px,3.2vw,36px)!important;line-height:1.05;letter-spacing:-.035em;color:#0a315c;margin:0}
.pm-family-v2-head .pm-section-sub{font-size:14px;max-width:660px}
.pm-family-v2-tree-action{display:grid;justify-items:end;gap:6px;min-width:250px}
.pm-family-v2-tree-action small{font-size:10px;color:#7890a8}
.pm-family-tree-btn{min-height:46px;display:inline-flex;align-items:center;justify-content:center;gap:10px;padding:11px 16px;border:1px solid #0e62b2;border-radius:16px;background:linear-gradient(180deg,#1b75c7,#0c5ba8);color:#fff;font-weight:800;box-shadow:0 12px 28px rgba(12,88,163,.20);transition:.2s ease}
.pm-family-tree-btn:hover{transform:translateY(-2px);box-shadow:0 16px 32px rgba(12,88,163,.25)}
.pm-family-tree-btn svg{width:20px;height:20px}.pm-family-tree-btn svg:last-child{width:16px;height:16px}
.pm-family-v2-flow{position:relative;z-index:1;display:grid;gap:12px}
.pm-family-v2-group{border:0;background:transparent;border-radius:18px;overflow:visible}
.pm-family-v2-group>summary{list-style:none;display:grid;grid-template-columns:46px minmax(0,1fr) auto 28px;align-items:center;gap:12px;min-height:56px;padding:0 4px;cursor:pointer;color:#123d68}
.pm-family-v2-group>summary::-webkit-details-marker{display:none}
.pm-family-v2-group>summary>span:nth-child(2){display:grid;gap:2px;min-width:0}
.pm-family-v2-group>summary strong{font-size:20px;line-height:1.05;letter-spacing:-.02em;color:#10375f}
.pm-family-v2-group>summary small{font-size:12px;color:#738ca4;font-style:italic;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pm-family-v2-group-icon{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;color:#0d64b3;background:linear-gradient(145deg,#ebf6ff,#fff);border:1px solid #d4e6f4;box-shadow:0 7px 18px rgba(20,91,153,.08)}
.pm-family-v2-group-icon svg{width:23px;height:23px}.pm-family-v2-candle{color:#725a36;background:linear-gradient(145deg,#faf5e9,#fff);border-color:#eadfc9}
.pm-family-v2-count{min-width:28px;height:28px;padding:0 8px;border-radius:999px;display:grid;place-items:center;font-size:11px;font-weight:800;color:#0d61ad;background:#edf6ff;border:1px solid #d4e6f4}
.pm-family-v2-chevron{display:grid;place-items:center;color:#66849f;transition:.2s ease}.pm-family-v2-chevron svg{width:18px;height:18px}
.pm-family-v2-group:not([open]) .pm-family-v2-chevron{transform:rotate(-90deg)}
.pm-family-v2-group-body{margin-left:58px;padding:12px 0 2px;position:relative}
.pm-family-v2-group-body:before{content:"";position:absolute;left:-35px;top:-8px;bottom:-12px;width:2px;background:linear-gradient(#bed9ef,#e4edf5)}
.pm-family-v2-parent-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.pm-family-v2-person-card,.pm-family-v2-member,.pm-family-v2-deceased-card{min-width:0;border:1px solid #d9e6f2;background:rgba(255,255,255,.96);border-radius:16px;box-shadow:0 8px 22px rgba(18,61,102,.045)}
.pm-family-v2-person-card{display:flex;align-items:center;gap:12px;padding:12px 14px}
.pm-family-v2-avatar{width:54px;height:54px;flex:0 0 54px;border-radius:50%;display:grid;place-items:center;overflow:hidden;background:linear-gradient(145deg,#e9f5ff,#fff);border:2px solid #d6e8f6;color:#0c5eaa;font-size:14px;font-weight:900;box-shadow:0 6px 16px rgba(12,83,145,.08)}
.pm-family-v2-avatar img{width:100%;height:100%;display:block;object-fit:cover}
.pm-family-v2-avatar-spouse{background:linear-gradient(145deg,#f6f1fb,#fff);border-color:#e5daef;color:#624d97}
.pm-family-v2-avatar-main{width:78px;height:78px;flex-basis:78px;border-width:4px;border-color:#cfe7f7;box-shadow:0 10px 28px rgba(12,92,162,.15)}
.pm-family-v2-person-copy{min-width:0;display:grid;align-content:center;gap:3px}
.pm-family-v2-person-copy small{font-size:9px;letter-spacing:.13em;text-transform:uppercase;color:#7892aa;font-weight:800}
.pm-family-v2-person-copy strong{font-size:16px;line-height:1.25;color:#123b64;overflow-wrap:anywhere}
.pm-family-v2-person-copy em{font-size:10px;color:#7890a7;font-style:normal}
.pm-family-v2-memorialized-row{display:grid;grid-template-columns:minmax(0,1.35fr) 34px minmax(0,.85fr);gap:10px;align-items:center;padding:12px;border-radius:18px;border:1px solid #cde1f2;background:linear-gradient(135deg,#f1f8ff,#fff);box-shadow:0 12px 30px rgba(11,76,136,.06)}
.pm-family-v2-deceased-card{display:flex;align-items:center;gap:14px;padding:10px 12px;border:0;background:transparent;box-shadow:none}
.pm-family-v2-deceased-card .pm-family-v2-person-copy strong{font-size:21px}
.pm-family-v2-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-top:4px;color:#5c7892;font-size:10px;font-weight:700}
.pm-family-v2-meta span{display:inline-flex;align-items:center;gap:4px}.pm-family-v2-meta svg{width:14px;height:14px;color:#0d65b3}
.pm-family-v2-age{color:#123f6a!important}
/* 0.15.56: idade abaixo das datas, inclusive nos cartões compactos do casal. */
.pm-family-v2-person-copy em.pm-family-member-age{display:block;font-size:9px!important;line-height:1.3!important;font-weight:500;color:#54728e!important;letter-spacing:0;white-space:normal;overflow-wrap:normal}
.pm-family-v2-person-copy .pm-family-member-age .pm-family-age-part{display:inline-block;white-space:nowrap;overflow-wrap:normal;word-break:normal}
/* 0.15.57 — a idade não deve herdar o destaque dos títulos/parentescos. */
.pm-family-tree-node small.pm-tree-age,
.pm-family-tree-dialog-couple .pm-family-tree-node small.pm-tree-age,
.pm-family-tree-dialog-couple .pm-tree-spouse small.pm-tree-age{display:block!important;font-family:'Play',Arial,sans-serif!important;font-size:9px!important;line-height:1.3!important;font-weight:500!important;letter-spacing:0!important;text-transform:none!important;color:#54728e!important;margin:2px 0 0!important;padding:0!important;white-space:normal!important;word-break:normal!important;overflow-wrap:normal!important}
.pm-family-tree-node .pm-tree-spouse>span{min-width:0}
.pm-family-v2-heart{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;color:#e23b55;background:#fff;border:1px solid #f6c9d2;box-shadow:0 5px 14px rgba(9,88,154,.07)}
.pm-family-v2-heart svg{width:17px;height:17px;fill:#e23b55;stroke:#e23b55}
.pm-family-v2-spouse-card{min-height:84px}
.pm-family-v2-generation-list{display:grid;gap:10px}
.pm-family-v2-couple-row{display:grid;grid-template-columns:minmax(0,1fr) 34px minmax(0,1fr);gap:9px;align-items:center}
.pm-family-v2-member{display:flex;align-items:center;gap:12px;padding:10px 13px;min-height:76px}
.pm-family-v2-member-spouse{background:linear-gradient(135deg,#fff,#fdfbff)}
.pm-family-v2-bottom-tree{width:100%;margin-top:18px;min-height:62px;display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 16px;border-radius:16px;border:1px solid #cfe1f0;background:linear-gradient(90deg,#f3f9ff,#fff);color:#174d7e;text-align:left}
.pm-family-v2-bottom-tree>svg{width:28px;height:28px;color:#0b67b7}.pm-family-v2-bottom-tree span{display:grid;gap:2px}.pm-family-v2-bottom-tree strong{font-size:13px}.pm-family-v2-bottom-tree small{font-size:10px;color:#7890a8}.pm-family-v2-bottom-tree b{display:inline-flex;align-items:center;gap:5px;color:#0b61ae;font-size:12px}.pm-family-v2-bottom-tree b svg{width:15px;height:15px}
/* Dialog árvore */
.pm-family-tree-dialog{width:min(1180px,94vw);max-width:1180px;max-height:90vh;padding:0;border:0;border-radius:24px;background:#f6f9fd;color:#123b64;box-shadow:0 30px 100px rgba(3,31,65,.34)}
.pm-family-tree-dialog::backdrop{background:rgba(4,23,46,.62);backdrop-filter:blur(6px)}
.pm-family-tree-dialog-inner{display:grid;grid-template-rows:auto 1fr;max-height:90vh}
.pm-family-tree-dialog-head{position:sticky;top:0;z-index:2;display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:22px 24px 18px;background:rgba(255,255,255,.96);border-bottom:1px solid #d9e6f1;backdrop-filter:blur(12px)}
.pm-family-tree-dialog-head h2{margin:0;font-size:26px;letter-spacing:-.025em}.pm-family-tree-dialog-head p{margin:5px 0 0;color:#768da3;font-size:12px}
.pm-family-tree-close{width:42px;height:42px;border-radius:13px;border:1px solid #bcd4ea;background:#eaf4ff;color:#0b4e8f;display:grid;place-items:center;flex:0 0 auto;box-shadow:0 4px 12px rgba(11,78,143,.12)}.pm-family-tree-close svg{width:20px;height:20px;fill:none!important;stroke:currentColor!important;stroke-width:2.2!important;stroke-linecap:round;stroke-linejoin:round}.pm-family-tree-close:hover{background:#dbeaf9}
.pm-family-tree-canvas{padding:26px;overflow:auto;display:grid;gap:0;min-width:0}
.pm-family-tree-level{position:relative;padding:16px;border:1px solid #d6e5f1;background:#fff;border-radius:18px;box-shadow:0 8px 24px rgba(14,60,103,.04)}
.pm-family-tree-level-title{display:block;margin-bottom:12px;font-size:10px;letter-spacing:.13em;text-transform:uppercase;color:#6c88a3;font-weight:900;text-align:center}
.pm-family-tree-nodes{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}
.pm-family-tree-node{display:flex;align-items:center;gap:10px;min-width:220px;max-width:340px;flex:1 1 240px;padding:10px 12px;border:1px solid #dbe8f3;border-radius:14px;background:linear-gradient(145deg,#fbfdff,#fff)}
.pm-family-tree-node>div:last-child{min-width:0;display:grid;gap:2px}.pm-family-tree-node small{font-size:8px;letter-spacing:.12em;text-transform:uppercase;color:#8095aa;font-weight:800}.pm-family-tree-node strong{font-size:13px;line-height:1.25;overflow-wrap:anywhere}.pm-family-tree-node em{font-size:10px;color:#798ea3;font-style:normal}
.pm-family-tree-node-main{border-color:#bfdcf2;background:linear-gradient(145deg,#edf7ff,#fff)}
.pm-family-tree-connector{width:2px;height:24px;background:linear-gradient(#9fc8e7,#d8e8f4);justify-self:center}
/* Responsivo */
@media(max-width:900px){
  .pm-family-v2-head{display:grid;gap:15px}.pm-family-v2-tree-action{justify-items:start;min-width:0}.pm-family-tree-btn{width:100%}
  .pm-family-v2-parent-grid{grid-template-columns:1fr}.pm-family-v2-memorialized-row{grid-template-columns:1fr}.pm-family-v2-heart{margin:auto}
  .pm-family-v2-couple-row{grid-template-columns:1fr}.pm-family-v2-spouse-card{min-height:0}
}
@media(max-width:700px){
  .pm-family-v2{padding:18px 12px!important}.pm-family-v2-head{margin-bottom:14px}.pm-family-v2-head h2{font-size:25px!important;line-height:1.03}.pm-family-v2-head .pm-section-sub{font-size:12px}
  .pm-family-v2-flow{gap:8px}.pm-family-v2-group{border:1px solid #d8e6f2;border-radius:16px;background:rgba(255,255,255,.74);overflow:hidden}
  .pm-family-v2-group>summary{grid-template-columns:38px minmax(0,1fr) auto 24px;gap:8px;min-height:62px;padding:8px 10px;background:linear-gradient(180deg,#fbfdff,#f5faff)}
  .pm-family-v2-group>summary strong{font-size:15px}.pm-family-v2-group>summary small{font-size:10px;font-style:normal}.pm-family-v2-group-icon{width:36px;height:36px}.pm-family-v2-group-icon svg{width:19px;height:19px}.pm-family-v2-count{height:24px;min-width:24px;padding:0 6px;font-size:10px}
  .pm-family-v2-group-body{margin-left:0;padding:8px 9px 10px}.pm-family-v2-group-body:before{display:none}
  .pm-family-v2-person-card,.pm-family-v2-member{padding:9px 10px;min-height:66px;border-radius:13px}.pm-family-v2-avatar{width:46px;height:46px;flex-basis:46px}.pm-family-v2-avatar-main{width:62px;height:62px;flex-basis:62px}
  .pm-family-v2-person-copy strong{font-size:13px}.pm-family-v2-person-copy small{font-size:8px}.pm-family-v2-deceased-card .pm-family-v2-person-copy strong{font-size:17px}
  .pm-family-v2-memorialized-row{padding:8px;gap:7px}.pm-family-v2-meta{font-size:9px;gap:5px 8px}.pm-family-v2-heart{width:27px;height:27px}.pm-family-v2-heart svg{width:14px;height:14px}
  .pm-family-v2-bottom-tree{grid-template-columns:34px minmax(0,1fr) 18px;padding:10px 12px}.pm-family-v2-bottom-tree b{font-size:0}.pm-family-v2-bottom-tree b svg{width:18px;height:18px}.pm-family-v2-bottom-tree>svg{width:24px;height:24px}.pm-family-v2-bottom-tree strong{font-size:12px}
  .pm-family-tree-dialog{width:100vw;max-width:none;height:100dvh;max-height:none;border-radius:0;margin:0}.pm-family-tree-dialog-inner{height:100dvh;max-height:none}.pm-family-tree-dialog-head{padding:16px}.pm-family-tree-dialog-head h2{font-size:20px}.pm-family-tree-canvas{padding:14px;gap:0}.pm-family-tree-level{padding:12px;border-radius:15px}.pm-family-tree-nodes{display:grid;grid-template-columns:1fr}.pm-family-tree-node{min-width:0;max-width:none;width:100%}
}
@media(max-width:430px){
  .pm-family-v2-head h2{font-size:22px!important}.pm-family-v2-head .pm-section-sub{font-size:11px;line-height:1.45}.pm-family-tree-btn{min-height:44px;font-size:13px;border-radius:14px}
  .pm-family-v2-group>summary{grid-template-columns:34px minmax(0,1fr) auto 20px;padding:7px 8px}.pm-family-v2-group-icon{width:32px;height:32px}.pm-family-v2-group>summary strong{font-size:14px}.pm-family-v2-group>summary small{font-size:9px}
  .pm-family-v2-person-card,.pm-family-v2-member{gap:9px}.pm-family-v2-avatar{width:42px;height:42px;flex-basis:42px}.pm-family-v2-avatar-main{width:58px;height:58px;flex-basis:58px}.pm-family-v2-person-copy strong{font-size:12.5px}.pm-family-v2-deceased-card{padding:8px}.pm-family-v2-meta span{white-space:normal}
}
/* 0.15.67: recorte próprio do retrato no cabeçalho, sem afetar a capa. */
.pm-family-v2-group>summary .pm-family-v2-cover{overflow:hidden!important;border-radius:50%!important;position:relative;isolation:isolate}
.pm-family-v2-group>summary .pm-family-v2-cover>img{display:block;width:100%!important;height:100%!important;max-width:100%;object-fit:cover;object-position:center;border-radius:50%;grid-area:1/1;min-width:0;min-height:0}
.pm-family-v2-avatar>img[hidden]{display:none!important}
.pm-family-tree-dialog .pm-family-tree-dialog-head .pm-family-tree-close{position:absolute!important;top:14px!important;right:14px!important;width:44px!important;height:44px!important;border-radius:50%!important;background:linear-gradient(145deg,#fff,#ffedbf)!important;border:1px solid #dca64a!important;color:#9a650e!important;box-shadow:0 6px 16px #ac782b40!important;animation:pmTreeCloseFloat 3s ease-in-out infinite}
.pm-family-tree-dialog .pm-family-tree-dialog-head{padding:12px 64px 12px 16px!important}
.pm-family-tree-dialog .pm-tree-spouse{display:flex;flex-wrap:wrap;gap:5px;align-items:center}
.pm-family-tree-dialog .pm-tree-spouse .pm-tree-spouse-avatar{width:34px!important;height:34px!important;flex:0 0 34px!important;min-width:34px;grid-area:auto}
.pm-family-tree-dialog .pm-tree-spouse>span:last-child{flex:1 1 60px}
.pm-family-tree-dialog .pm-tree-spouse-avatar img{border-radius:50%;object-fit:cover}
@keyframes pmTreeCloseFloat{50%{transform:translateY(-3px)}}
@media(prefers-reduced-motion:reduce){.pm-family-tree-dialog .pm-family-tree-dialog-head .pm-family-tree-close{animation:none}}
/* 0.15.74: cada pessoa tem uma linha própria, retrato ao lado do nome. */
.pm-family-tree-dialog .pm-family-tree-dialog-head h2{margin:4px 0!important;font-size:clamp(24px,6vw,32px)!important}
.pm-family-tree-dialog .pm-family-tree-ornament{margin:0 auto 3px!important;width:24px!important;height:24px!important}
.pm-family-tree-dialog .pm-family-tree-ornament svg{width:24px!important;height:24px!important}
.pm-family-tree-dialog .pm-family-tree-dialog-head p{margin:3px 0 0!important}
.pm-family-tree-dialog .pm-family-tree-many .pm-tree-person-card{display:block!important;padding:7px!important}
.pm-family-tree-dialog .pm-tree-person-row{display:grid!important;grid-template-columns:32px minmax(0,1fr)!important;align-items:start!important;gap:6px!important}
.pm-family-tree-dialog .pm-tree-person-row>.pm-family-v2-avatar{width:32px!important;height:32px!important;min-width:32px!important;align-self:start!important;margin:0!important}
.pm-family-tree-dialog .pm-tree-person-copy{min-width:0}
.pm-family-tree-dialog .pm-tree-person-copy>small,.pm-family-tree-dialog .pm-tree-person-copy>strong{display:block;overflow-wrap:break-word}
.pm-family-tree-dialog .pm-tree-spouse-row{border-top:1px solid #ecd7a1;margin-top:9px;padding-top:9px}
.pm-family-tree-dialog .pm-tree-person-copy>strong{font-size:10px!important;line-height:1.3!important}
.pm-family-tree-dialog .pm-family-tree-dialog-head .pm-family-tree-close{transition:box-shadow .18s,background .18s,scale .18s;touch-action:manipulation}
.pm-family-tree-dialog .pm-family-tree-dialog-head .pm-family-tree-close:hover,.pm-family-tree-dialog .pm-family-tree-dialog-head .pm-family-tree-close:focus-visible{background:#ffe7a4!important;box-shadow:0 0 0 4px #ebbd5540,0 8px 20px #ac782b60!important;scale:1.08;outline:2px solid #bf8720;outline-offset:2px}
.pm-family-tree-dialog .pm-family-tree-dialog-head .pm-family-tree-close:active{scale:.94}
@media(max-width:360px){.pm-family-tree-dialog .pm-family-tree-many{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(prefers-reduced-motion:reduce){.pm-family-tree-dialog .pm-family-tree-dialog-head .pm-family-tree-close{transition:none;scale:1}}
.pm-family-tree-dialog .pm-tree-spouse-row{position:relative;margin-top:15px;padding-top:15px}
.pm-family-tree-dialog .pm-tree-couple-ruby{position:absolute;left:50%;top:-12px;transform:translateX(-50%);display:grid;place-items:center;width:24px;height:24px;border-radius:50%;border:1px solid #e6ba60;background:radial-gradient(circle at 35% 25%,#fff,#fff3d8);box-shadow:0 3px 8px #a16c1d26}
.pm-family-tree-dialog .pm-tree-couple-ruby svg{width:17px!important;height:17px!important;filter:drop-shadow(0 1px 1px #9f123f44)}
.pm-family-tree-dialog .pm-tree-couple-ruby .ruby-body{fill:#e72f55!important;stroke:#aa1537!important}
.pm-family-tree-dialog .pm-tree-couple-ruby .ruby-shine{stroke:#ffe5ec!important;fill:none!important}
.pm-family-tree-dialog .pm-tree-age-stacked{display:block!important;font:400 9px/1.35 Play,Arial,sans-serif!important;letter-spacing:normal!important;text-transform:none!important;color:#54728e!important;margin-top:4px!important}
.pm-family-tree-dialog .pm-tree-age-stacked>span{display:block!important;font:inherit!important;color:inherit!important}
/* Idades individuais do casal falecido permanecem em uma só linha. */
.pm-family-tree-dialog .pm-tree-age-inline{display:block!important;white-space:nowrap;font:400 9px/1.35 Play,Arial,sans-serif!important;letter-spacing:normal!important;text-transform:none!important;color:#54728e!important;margin-top:4px!important}
.pm-family-tree-dialog .pm-tree-age-inline>span{display:inline!important;font:inherit!important;color:inherit!important}





