*{box-sizing:border-box}
html,body{margin:0;min-height:100%}
body{background:#f6f1e6;color:#2b2118;font-family:Georgia,'Times New Roman',serif;line-height:1.45}
a{color:inherit}
.wrap{max-width:1000px;margin:0 auto;padding:0 16px 40px}
header.top{padding:28px 0 8px}
header.top h1{font-size:34px;margin:0 0 6px;font-weight:600;color:#3a2a14}
.fact{color:#7a6234;font-size:14px;margin:0 0 10px}
.intro{max-width:720px;margin:0 0 14px;color:#4a3a22}
nav.tabs{display:flex;flex-wrap:wrap;gap:18px;border-bottom:1px solid #cdbd98}
nav.tabs a{padding:10px 0;color:#7a6234;text-decoration:none}
nav.tabs a.on{color:#2b2118;box-shadow:inset 0 -2px 0 #8f7439}
@media (max-width:600px){nav.tabs{flex-wrap:nowrap;overflow-x:auto;gap:16px}nav.tabs a{white-space:nowrap;min-height:44px;display:inline-flex;align-items:center}}
.scroll{margin-top:18px;padding:20px 16px;border-radius:14px;background:#efe2c4 url(parchment.jpg);background-size:880px auto;box-shadow:inset 0 0 46px rgba(122,90,38,.28),0 1px 3px rgba(60,40,10,.25)}
h2.g{font-size:22px;margin:18px 0 8px;color:#3a2a14}
h2.g:first-child{margin-top:0}
h3.g{font-size:17px;margin:18px 0 6px;color:#4a3512}
p{margin:8px 0}
.hand{font-family:'Snell Roundhand','Apple Chancery','Segoe Script','Brush Script MT',cursive;font-weight:600}
.heb{font-family:'Times New Roman','David','Ezra SIL',serif;color:#6b4d1f;font-size:1.06em}
.note{font-size:12px;color:#7a6234;font-style:italic}
.chiplist{display:flex;flex-wrap:wrap;gap:8px}
.chip{display:inline-flex;align-items:baseline;gap:6px;background:rgba(255,251,238,.72);border:1px solid #c9b183;border-radius:10px;padding:3px 9px;color:#3d2c12;text-decoration:none;font-size:14px}
.chip:hover{background:rgba(255,248,226,.95)}
.chip.plain{border-style:dashed}
.roots{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.rootbtn{display:inline-flex;align-items:baseline;gap:6px;border:1px solid #b39a63;background:rgba(255,250,234,.6);border-radius:999px;padding:6px 12px;font:inherit;font-size:14px;color:#4a3512;cursor:pointer;min-height:44px}
.rootbtn.on{background:#f7ecc9;border-color:#8f7439;box-shadow:0 0 0 1px #8f7439 inset}
.rootn{font-size:12px;color:#7a6234}
.tree{margin-top:12px}
.trow{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:3px 0;border-bottom:1px dashed rgba(122,90,38,.22)}
.toggle{flex:none;min-width:30px;height:26px;border-radius:999px;border:1px solid #a98c56;background:rgba(255,250,234,.85);color:#6b4f22;font-size:11px;font-weight:700;cursor:pointer;padding:0 6px}
.leaf{flex:none;width:30px}
.spouse{font-size:13px;color:#6b4f22;display:inline-flex;align-items:baseline;gap:4px;flex-wrap:wrap}
.spouse em{font-size:12px;color:#7a6234}
.prow,.lrow{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:5px 0;border-bottom:1px dashed rgba(122,90,38,.22)}
.pmeta{font-size:12px;color:#7a6234}
.fichacard{text-align:center;padding:14px 8px 4px;display:flex;flex-direction:column;align-items:center;gap:8px}
.fichaname{font-size:30px;color:#33240c}
.fichaheb{font-size:34px;color:#6b4d1f}
.arrow{color:#8f7439;font-weight:700}
.irow{padding:7px 0;border-bottom:1px dashed rgba(122,90,38,.22)}
.ieq{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.mkey{font-weight:600;color:#4a3512;margin-top:4px}
.btn{font:inherit;padding:6px 12px;border:1px solid #a98d5f;background:#f3e8cc;color:#2b2118;border-radius:6px;cursor:pointer;text-decoration:none;display:inline-block}
.btn.on{background:#a98d5f;color:#fff}
.sort{display:flex;gap:8px;margin:8px 0}
input.search{width:100%;font:inherit;font-size:16px;padding:10px 12px;border:1px solid #b39a63;border-radius:8px;background:#fffdf6;margin:8px 0}
.sol{font-style:italic;color:#6b4f1f}
.callout{border-left:4px solid #a98d5f;background:rgba(255,251,238,.6);padding:8px 12px;border-radius:6px;margin:8px 0}
footer.closing{margin-top:16px;font-size:13px;color:#7a6234}
/* puerta */
#gate{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:20px;background:#efe2c4 url(parchment.jpg);background-size:880px auto}
#gate .card{max-width:420px;width:100%;background:rgba(255,251,238,.92);border:1px solid #c9b183;border-radius:14px;padding:26px 22px;box-shadow:0 2px 10px rgba(60,40,10,.3);text-align:center}
#gate h1{font-size:26px;margin:0 0 6px;color:#3a2a14}
#gate p{color:#6b5530;margin:6px 0 14px}
#gate input{width:100%;font:inherit;font-size:17px;padding:11px 12px;border:1px solid #b39a63;border-radius:8px;background:#fffdf6;text-align:center}
#gate button{margin-top:12px;width:100%;font:inherit;font-size:17px;padding:11px;border:0;border-radius:8px;background:#8f7439;color:#fff;cursor:pointer}
#gate button:disabled{opacity:.6}
#gate .err{color:#9b2c1d;min-height:1.3em;margin:10px 0 0;font-size:14px}

[hidden]{display:none !important}
.tv{position:relative;height:78vh;min-height:420px;margin-top:12px;border:1px solid #c9b183;border-radius:12px;background:rgba(255,250,234,.55);overflow:hidden;touch-action:none;cursor:grab}
.tv.drag{cursor:grabbing}
.tv-svg{display:block;user-select:none;-webkit-user-select:none}
.tv-edge{fill:none;stroke:#8f7439;stroke-width:1.6;opacity:.75}
.tv-card{fill:#fffbee;stroke:#b39a63;stroke-width:1.2}
.tv-card.root{fill:#f7ecc9;stroke:#8f7439;stroke-width:2}
.tv-node.has{cursor:pointer}
.tv-name{font:600 13px 'Segoe Print','Bradley Hand','Comic Sans MS',cursive,serif;fill:#3a2a14}
.tv-heb{font:14px 'Times New Roman','David',serif;fill:#6b4f22}
.tv-sp{font:italic 10.5px Georgia,serif;fill:#7a6330}
.tv-togc{fill:#8f7439;stroke:#fffbee;stroke-width:2}
.tv-togt{font:700 11px sans-serif;fill:#fff}
.tv-infoc{fill:#fffbee;stroke:#8f7439}
.tv-infot{font:italic 700 11px Georgia,serif;fill:#6b4f22}
.tv-info,.tv-tog{cursor:pointer}
.tv-ctl{position:absolute;right:10px;top:10px;display:flex;flex-direction:column;gap:6px}
.tv-ctl button{width:40px;height:40px;border-radius:10px;border:1px solid #8f7439;background:#fffbee;color:#4a3512;font-size:20px;cursor:pointer}
