body.fam{height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden}
.fbar{display:flex;gap:8px;align-items:center;padding:7px 12px;background:#fbf9f5;border-bottom:1px solid var(--line);flex-wrap:wrap;position:relative;z-index:30}
.fbar input[type=search]{width:260px;max-width:60vw;padding:5px 8px;border:1px solid #cfc6b6;border-radius:6px}
.fbar button,.fbar select{padding:4px 9px;border:1px solid #cfc6b6;background:#fff;border-radius:6px;cursor:pointer;font-size:13px}
.fbar .grp{display:inline-flex;gap:2px}
.fsearch,.fpick{position:relative}
.fresults{position:absolute;top:34px;left:0;width:390px;max-width:92vw;max-height:360px;overflow:auto;background:#fff;border:1px solid #cfc6b6;border-radius:6px;box-shadow:0 6px 20px #0002;z-index:40}
.fresults div{padding:5px 9px;cursor:pointer;border-bottom:1px solid #f0ebe2}.fresults div:hover,.fresults div.on{background:#f6ecd9}
.fresults small{color:var(--muted)}
.fammenu{position:absolute;top:34px;left:0;width:330px;background:#fff;border:1px solid #cfc6b6;border-radius:8px;box-shadow:0 6px 20px #0002;padding:8px 10px;z-index:40}
.fammenu label{display:flex;gap:6px;align-items:center;padding:3px 0;font-size:13px;cursor:pointer}.fammenu label small{margin-left:auto;color:var(--muted)}
.fammenu .row{display:flex;gap:6px;margin-top:6px}.fammenu .row button{font-size:12px}
#famsum{font-size:11px;color:var(--muted)}
.focusbar{background:#fff3d6;border:1px solid #e0c27a;border-radius:6px;padding:2px 8px;font-size:13px}.focusbar input{width:42px}
.hidden{display:none!important}
.flegend{display:flex;gap:5px;flex-wrap:wrap;font-size:11px;margin-left:auto}
.lg{padding:1px 6px;border-radius:4px;border:1.5px solid #3b6ea5;background:#fff}.lg.f{border-color:#b0477a}.lg.g{border-style:dashed;border-color:#777}
.lg.w{border-color:#b0477a;background:#fbeef4}.lg.c{border:1.5px dashed #b0477a;background:#fff}.lg.gh{border:1.5px dashed #999;color:#666}.lg.tr{border:1.5px dotted #7a4e1d}.lg.x{border-color:#c79a2b;background:#fff7e0}
.fwrap{flex:1;display:grid;grid-template-columns:1fr 420px;min-height:0;position:relative}
.fwrap.nopanel{grid-template-columns:1fr 0}
.fcanvas{position:relative;overflow:hidden;background:#fffdf9;cursor:grab;touch-action:none}
.fcanvas.drag{cursor:grabbing}
#fsvg{width:100%;height:100%;display:block;user-select:none;-webkit-user-select:none}
.minimap{position:absolute;right:10px;bottom:10px;border:1px solid #cfc6b6;border-radius:6px;background:#fffdf9ee;box-shadow:0 2px 8px #0002;cursor:crosshair;touch-action:none}
.fhint{position:absolute;bottom:8px;left:10px;font-size:11px;color:var(--muted);background:#fffdf9cc;padding:2px 6px;border-radius:4px;pointer-events:none}
.fpanel{border-left:1px solid var(--line);background:#fff;overflow:auto;padding:12px 16px;position:relative}
.nopanel .fpanel{display:none}
.pclose{position:absolute;right:8px;top:8px;border:0;background:none;font-size:16px;cursor:pointer;color:#888}
.fpanel h2{margin:4px 0 2px;font-size:20px;padding-right:20px}.fpanel h3{font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--accent);margin:14px 0 4px}
.fpanel .orig{font-size:24px}.fpanel .orig.he{font-family:var(--heb);direction:rtl}.fpanel .orig.gr{font-family:var(--grk)}
.fpanel ul{margin:4px 0;padding-left:16px}.fpanel li{margin:3px 0}
.fpanel a.pl{color:#7a4e1d;cursor:pointer;text-decoration:underline dotted}
.fpanel .ctr{font-size:11px;border:1px solid #d8cdb8;background:#fbf7ef;border-radius:8px;padding:0 5px;margin-left:4px;cursor:pointer;color:#5b4320}
.fpanel .oq{background:#fff7e0;border-left:3px solid #c79a2b;padding:5px 8px;margin:6px 0;font-size:13px}
.fpanel .sel{background:#f6ecd9;border-left:3px solid #7a4e1d;padding:5px 8px;margin:6px 0;font-size:13px}
.fpanel .tt{background:#fff3d6;border-left:3px solid #c79a2b;padding:5px 8px;margin:6px 0;font-size:13px}
.fpanel .nt{font-size:13px;margin:5px 0}
.fpanel .tl{display:inline-block;margin:6px 6px 0 0;padding:4px 10px;background:#2b2118;color:#f3e9da;border-radius:14px;text-decoration:none;font-size:13px;cursor:pointer;border:0}
.fpanel .tl.alt{background:#fff;color:#2b2118;border:1px solid #2b2118}
.fpanel .tag{font-size:11px;padding:1px 6px;border-radius:8px;background:#eee;margin-left:4px}
.fpanel .tag.w{background:#fbeef4;color:#8b2c5b}.fpanel .tag.c{background:#fff;border:1px dashed #b0477a;color:#8b2c5b}
.fpanel .spg{border:1px solid var(--line);border-radius:8px;padding:6px 8px;margin:6px 0;background:#fcfaf6}
.fpanel .spg .h{font-weight:600}
.fpanel table.dates{border-collapse:collapse;font-size:13px}.fpanel table.dates td{padding:2px 8px 2px 0;vertical-align:top}
.chip{display:inline-block;font-size:12px;border:1px solid #cdbf9f;background:#fbf5e8;border-radius:10px;padding:0 7px;margin:2px 3px 2px 0;cursor:pointer;color:#5b4320;white-space:nowrap}
.chip:hover{background:#f3e3bf}
.vpop{position:fixed;z-index:60;max-width:440px;background:#fff;border:1px solid #cfc6b6;border-radius:8px;box-shadow:0 8px 28px #0003;padding:10px 12px;font-size:13px}
.vpop .ref{font-weight:600}.vpop .wlc{font-family:var(--heb);font-size:19px;direction:rtl;text-align:right;line-height:1.7}.vpop .grc{font-family:var(--grk);font-size:16px;line-height:1.5}
.vpop mark{background:#fde68a;padding:0 1px}.vpop .x{float:right;cursor:pointer;color:#888}
.fempty p{font-size:13px;color:#444}
/* svg */
.nd{cursor:pointer}
.nd rect.b{fill:#fff;stroke:#3b6ea5;stroke-width:1.5}
.nd.f rect.b{stroke:#b0477a}.nd.g rect.b{stroke:#777;stroke-dasharray:4 3}
.nd.wife rect.b{fill:#fbeef4}.nd.conc rect.b{fill:#fff;stroke-dasharray:5 3}
.nd.ghost rect.b{fill:#fafafa;stroke:#999;stroke-dasharray:4 3}.nd.ghost text{fill:#666}
.nd.fold rect.b{fill:#f6ecd9;stroke:#7a4e1d;stroke-dasharray:2 2}.nd.fold text{fill:#7a4e1d}
.nd.root3 rect.b{stroke:#c79a2b}
.nd.sel rect.b{stroke:#e0a100;stroke-width:3.5}.nd.hit rect.b{fill:#fde68a}.nd.focus rect.b{stroke:#c0392b;stroke-width:3}
.nd text{font-size:12px;fill:#1f2430;pointer-events:none}.nd text.nm{font-weight:600}
.nd text.or{font-size:12px;fill:#7a4e1d}.nd text.or.he{font-family:var(--heb)}.nd text.or.gr{font-family:var(--grk)}
.nd text.mk{font-size:11px;font-weight:700}.nd text.mk.q{fill:#c79a2b}.nd text.mk.s{fill:#7a4e1d}.nd text.mk.t{fill:#2f6f9f}.nd text.mk.x{fill:#b07a00}
.nd .tog rect{fill:#fff;stroke:#b9b0a0}.nd .tog text{font-size:11px;fill:#555;font-weight:700}
.nd.lod0 text{display:none}
path.ed{fill:none;stroke:#a89f8f;stroke-width:1.4}
path.ed.tr{stroke:#7a4e1d;stroke-dasharray:2 4;stroke-width:1.6}
path.ed.mar{stroke:#b0477a;stroke-width:1.6}path.ed.marc{stroke:#b0477a;stroke-width:1.4;stroke-dasharray:5 3}
path.ed.gh{stroke:#aaa;stroke-dasharray:3 3}
path.ed.hl{stroke:#e0a100;stroke-width:3}
text.lbl{font-size:10px;fill:#7a4e1d}
text.rootlbl{font-size:13px;fill:#7a4e1d;font-weight:600}
@keyframes pulse{0%{stroke-width:10;stroke-opacity:.9}100%{stroke-width:2;stroke-opacity:0}}
rect.pulse{fill:none;stroke:#e0a100;animation:pulse 1.2s ease-out 3}
@media (max-width:820px){
  .fwrap{grid-template-columns:1fr;grid-template-rows:1fr auto}
  .fpanel{border-left:0;border-top:1px solid var(--line);max-height:42vh}
  .fhint{display:none}
  .flegend{display:none}.minimap{width:100px;height:68px;right:6px;bottom:6px}
  header.top .sub{display:none}
}
/* Phase 7d — compact list (outline) view */
.flist{display:none;position:absolute;inset:0;overflow:auto;background:#fffdf9;padding:8px 10px 40px;cursor:default;touch-action:auto;z-index:5}
.listmode .flist{display:block}.listmode #fsvg,.listmode .minimap,.listmode .fhint{display:none}
.fbar .lbtn.on{background:#2b2118;color:#f3e9da;border-color:#2b2118}
ul.ftree,ul.ftree ul{list-style:none;margin:0;padding-left:16px}ul.ftree{padding-left:2px}
ul.ftree ul{border-left:1px dotted #cdbf9f;margin-left:5px;padding-left:12px}
ul.ftree li{margin:1px 0;font-size:13px;line-height:1.5}
ul.ftree summary{cursor:pointer;list-style:none}ul.ftree summary::-webkit-details-marker{display:none}
ul.ftree summary::before{content:"▸";display:inline-block;width:14px;color:#7a4e1d}ul.ftree details[open]>summary::before{content:"▾"}
ul.ftree li.leaf{padding-left:14px}
ul.ftree .ln{color:#1f2430;cursor:pointer;text-decoration:none;font-weight:600}ul.ftree .ln:hover{text-decoration:underline}
ul.ftree .ln.on{background:#fde68a;border-radius:3px;padding:0 2px}ul.ftree .ln.gh{color:#777;font-weight:400}
ul.ftree .ln.flash{outline:3px solid #e0a100}
ul.ftree .lo{color:#7a4e1d;font-size:12px}ul.ftree .lo.he{font-family:var(--heb)}ul.ftree .lo.gr{font-family:var(--grk)}
ul.ftree .lw{color:#8b2c5b;font-size:12px}ul.ftree .lw .ln{color:#8b2c5b;font-weight:500}
ul.ftree li.lm{font-size:11px;color:var(--muted);font-style:italic;padding-left:14px}
ul.ftree small{color:var(--muted);font-size:10px}
@media (max-width:820px){ul.ftree li{font-size:14px;line-height:1.8}}

.famnote{background:#fff3d6;border-bottom:1px solid #e0c27a;padding:6px 14px;font-size:13px}.famnote.hidden{display:none}
