:root{color-scheme:dark;--bg:#071019;--surface:rgba(10,25,35,.92);--edge:rgba(183,214,227,.16);--text:#eaf1ef;--muted:#9eb5bb;--gold:#e2c492;--green:#87dcc0;--focus:#bcffd9;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}
*{box-sizing:border-box}html,body{height:100%;margin:0;overflow:hidden;background:var(--bg);color:var(--text)}
button,input,select{font:inherit}button,.upload-label{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:2px solid var(--focus);outline-offset:3px}
button{border:0}button:disabled{opacity:.4;cursor:not-allowed}.visually-hidden{position:absolute;height:1px;width:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.starfield{position:fixed;inset:0;background:radial-gradient(ellipse at 48% 32%,rgba(38,91,95,.17),transparent 58%),radial-gradient(ellipse at 12% 80%,rgba(120,90,61,.09),transparent 45%),#071019;pointer-events:none}
.starfield:after{content:"";position:absolute;inset:0;opacity:.4;background-image:radial-gradient(circle at 15% 26%,#a8c7b7 0 1px,transparent 1.8px),radial-gradient(circle at 52% 65%,#c3d6d0 0 .7px,transparent 1.5px),radial-gradient(circle at 78% 19%,#b7d1c8 0 1px,transparent 1.8px);background-size:239px 233px,181px 207px,347px 293px}
.shell{height:100dvh;min-height:300px;display:flex;flex-direction:column;position:relative}.topbar{height:66px;flex:0 0 66px;display:flex;align-items:center;gap:27px;padding:0 22px;border-bottom:1px solid var(--edge);background:rgba(6,16,24,.88);z-index:10}
.brand{text-decoration:none;color:var(--green);font-size:29px;display:flex;align-items:center;gap:8px;font-weight:600;white-space:nowrap}.brand-symbol{width:40px;height:40px;object-fit:contain}.brand-wordmark{width:112px;height:auto;max-height:32px;object-fit:contain}
.title-line{border-left:1px solid var(--edge);padding-left:21px;display:flex;align-items:center;gap:12px}.title-line strong{font-family:Georgia,serif;font-size:21px;font-weight:500}.eyebrow{font-size:10px;letter-spacing:.19em;font-weight:760;color:var(--gold)}
.beta-back{margin-left:auto;color:var(--green);font-size:12px;text-decoration:none;white-space:nowrap}.pilot-strip{display:flex;flex:0 0 auto;justify-content:space-between;align-items:center;gap:6px 16px;flex-wrap:wrap;padding:7px 18px;border-bottom:1px solid var(--edge);background:#10282f;font-size:11px;color:var(--muted)}.pilot-strip strong{color:var(--gold)}#save-state{color:var(--green);font-size:11px}.demo-mode .pilot-strip{background:#322c20}.demo-mode #save-state{color:var(--gold)}
.workspace{position:relative;display:flex;flex:1;min-height:0}.map-area{height:100%;width:100%;position:relative;overflow:hidden}
#constellation{display:block;height:100%;width:100%;touch-action:none;cursor:grab}
#constellation.dragging{cursor:grabbing}.tree-halo{fill:rgba(69,117,126,.05);stroke:rgba(176,215,202,.06);stroke-width:2}.family-edge{stroke:rgba(178,202,190,.48);stroke-width:2.4;fill:none}.partner-edge{stroke:rgba(218,193,152,.35);stroke-width:2;stroke-dasharray:6 6}.match-edge{stroke:var(--green);stroke-dasharray:9 8;stroke-width:3.7;filter:drop-shadow(0 0 6px rgba(134,226,196,.45))}
.genealogy-node{cursor:pointer}.genealogy-node .node-glow{fill:rgba(217,186,137,.05);stroke:rgba(218,196,145,.22);stroke-width:1}.genealogy-node .node-core{fill:#102a34;stroke:rgba(217,195,159,.75);stroke-width:2.2}.genealogy-node:hover .node-core,.genealogy-node.selected .node-core{stroke:var(--green);stroke-width:4;fill:#173b42}.genealogy-node .symbol{fill:var(--gold);font-size:22px;font-family:Georgia,serif;text-anchor:middle;dominant-baseline:middle}
.genealogy-node .person-name{fill:#f0f4f2;font-size:20px;paint-order:stroke;stroke:#08151d;stroke-width:4;stroke-linejoin:round;text-anchor:middle;font-weight:650}.genealogy-node .person-date{fill:#aabec1;font-size:15px;paint-order:stroke;stroke:#08151d;stroke-width:3;text-anchor:middle}
.genealogy-node.found .node-core{stroke:#d9e9af;stroke-width:4}.genealogy-node.dimmed{opacity:.23}.tree-label{font-size:29px;fill:var(--gold);text-anchor:middle;font-family:Georgia,serif}.tree-small{font-size:14px;fill:#94b4b4;text-anchor:middle;letter-spacing:.08em}
.map-overlay{position:absolute;z-index:3}.top-left{left:16px;top:16px;right:360px;max-width:930px;display:flex;flex-direction:column;gap:8px;pointer-events:none}.toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:7px;pointer-events:auto}
.subtle,.upload-label,.main-action{min-height:38px;padding:9px 13px;border:1px solid rgba(173,208,196,.22);border-radius:11px;background:rgba(13,29,38,.88);color:#e6f1ee;font-size:12px;font-weight:620;backdrop-filter:blur(16px);white-space:nowrap}.subtle:hover,.upload-label:hover{background:rgba(30,62,67,.9);border-color:rgba(163,221,202,.53)}.main-action{background:var(--green);color:#092524;border-color:var(--green);font-weight:800}.main-action:hover{background:#b1f1db}
.toolbar select{height:38px;padding:0 11px;color:#f1f7f1;background:#142c34;border:1px solid rgba(179,211,198,.32);border-radius:10px;max-width:220px;min-width:130px;font-size:12px}
.search{left:16px;bottom:64px}.search input{width:min(320px,80vw);height:46px;padding:11px 17px;background:rgba(10,27,36,.95);border-radius:14px;border:1px solid rgba(174,205,201,.32);color:white;box-shadow:0 12px 50px #0004;font-size:13px}
.legend{left:18px;bottom:23px;display:flex;align-items:center;gap:8px;font-size:11px;color:var(--muted)}.key{display:inline-block;width:18px;border-top:2px solid #a3b8ae;margin-left:11px}.key:first-child{margin-left:0}.key.link{border-color:var(--green);border-top-style:dashed}
.zoom-controls{left:16px;bottom:126px;display:grid;gap:4px}.zoom-controls button{width:39px;height:39px;border-radius:11px;color:#ddf0e6;background:#132e39b9;border:1px solid var(--edge);font-size:22px}
.notification{position:relative;z-index:5;flex:0 0 auto;border-top:1px solid var(--edge);background:#0c2029;padding:8px 16px calc(8px + env(safe-area-inset-bottom));color:var(--muted);font-size:11px;line-height:1.5}
.inspector{position:absolute;z-index:4;right:14px;top:14px;bottom:14px;width:340px;max-width:calc(100% - 28px);border:1px solid rgba(171,203,198,.18);border-radius:23px;background:linear-gradient(160deg,rgba(20,40,48,.98),rgba(9,24,33,.98));box-shadow:0 25px 85px #0006;display:flex;flex-direction:column;padding:22px;overflow:hidden;transition:transform .2s ease}
.inspector.collapsed{transform:translateX(calc(100% + 20px))}.inspector-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:9px;flex:0 0 auto}.inspector-header button{border:0;background:transparent;color:var(--muted);font-size:27px}
#inspector-content{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-right:4px;font-size:13px}
#inspector-content h2{font:normal 29px/1.2 Georgia,serif;margin:9px 0;color:#fff2e0}
#inspector-content h3{margin:22px 0 7px;font-size:13px;color:var(--gold)}
#inspector-content p{line-height:1.65;color:var(--muted)}.person-facts{margin:16px 0;display:grid;gap:8px}.fact{border-bottom:1px solid var(--edge);padding:0 0 8px;display:flex;flex-direction:column;gap:3px}.fact small{font-size:11px;color:var(--muted)}.fact strong{font-size:13px;font-weight:600;color:#f6faf7}
.field-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 0;border-bottom:1px solid var(--edge);font-size:12px}.field-row label{flex:1;line-height:1.5}.field-row input{accent-color:var(--green);width:18px;height:18px}
.mini-action{padding:10px 12px;font-weight:700;font-size:12px;color:#15292c;border-radius:10px;background:var(--gold);margin:9px 6px 0 0}.mini-action.secondary{color:#eaf1ef;background:#21414a}.mini-action:disabled{opacity:.42}
.proposal{padding:13px;border:1px solid var(--edge);border-radius:13px;margin:11px 0;background:#102b34}.proposal strong{font-size:12px;color:#f5e2bf}.proposal small{font-size:11px;color:var(--muted)}.proposal ul{padding-left:16px;color:#b9d6d0;font-size:11px;line-height:1.65}.privacy-note{background:#102f35;border-left:3px solid var(--green);border-radius:8px;padding:13px 12px;margin:13px 0;color:var(--muted);line-height:1.5}
dialog{border:1px solid rgba(200,223,212,.3);background:#102832;color:var(--text);border-radius:22px;padding:26px;max-width:calc(100vw - 24px);width:520px;box-shadow:0 32px 110px #000c}dialog::backdrop{background:rgba(2,9,15,.78);backdrop-filter:blur(5px)}.dialog-heading h2{font:normal 29px Georgia,serif;margin:6px 0 19px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.form-grid label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#bed0d0}.form-grid .wide{grid-column:1/-1}.form-grid input,.form-grid select{padding:11px;min-width:0;min-height:42px;border:1px solid rgba(200,223,212,.3);background:#081d28;border-radius:10px;color:var(--text)}.dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:24px}.help{font-size:12px;color:var(--muted);line-height:1.5;margin:15px 0 0}
@media(max-width:930px){.top-left{right:16px}.toolbar{max-width:calc(100% - 10px)}.search{bottom:75px}.inspector{top:auto;left:12px;right:12px;bottom:10px;width:auto;max-width:none;height:min(42vh,360px);padding:17px 20px;border-radius:20px}.inspector.collapsed{transform:translateY(calc(100% + 20px))}.zoom-controls{top:auto;bottom:140px;left:auto;right:15px}.legend{bottom:17px}.map-area{height:100%}}
@media(max-width:550px){.topbar{height:58px;flex-basis:58px;padding:0 13px;gap:11px}.brand{font-size:24px}.brand-symbol{width:28px;height:28px}.brand-wordmark{width:76px}.beta-back{font-size:10px}.title-line{padding-left:11px;gap:5px;flex-direction:column;align-items:flex-start}.title-line strong{font-size:16px}.eyebrow{font-size:9px}.pilot-strip{padding:6px 10px;font-size:10px}#save-state{font-size:10px}.top-left{top:10px;left:8px;right:8px}.toolbar{flex-wrap:wrap;width:100%;max-width:100%}.toolbar select{min-width:108px;max-width:145px;flex:1 1 108px}.subtle,.upload-label,.main-action{font-size:11px;padding:8px 10px;min-height:34px}.search{left:8px;bottom:57px}.search input{height:40px}.zoom-controls{bottom:108px}.inspector{height:min(42vh,330px)}.legend{left:9px;bottom:12px;font-size:10px}.form-grid{grid-template-columns:1fr 1fr;gap:9px}dialog{padding:18px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

.partner-edge,.match-edge{fill:none}


.file-menu{position:relative;pointer-events:auto}.file-menu summary{list-style:none;cursor:pointer}.file-menu summary::-webkit-details-marker{display:none}.file-menu summary:after{content:" ▾"}.file-menu[open] summary:after{content:" ▴"}.file-actions{position:absolute;z-index:10;top:calc(100% + 8px);left:0;width:252px;max-width:calc(100vw - 32px);max-height:50vh;overflow-y:auto;padding:10px;display:grid;gap:7px;background:#10262f;border:1px solid var(--edge);border-radius:14px;box-shadow:0 12px 40px #0008}.file-actions>*{width:100%;text-align:left}.empty-start{position:absolute;left:calc((100% - 350px)/2);top:56%;transform:translate(-50%,-50%);width:min(420px,calc(100% - 40px));text-align:center;z-index:2}.empty-start[hidden]{display:none}.empty-start h1{font:normal 31px/1.22 Georgia,serif;margin:9px 0 14px;color:#f6e7d2}.empty-start p:not(.eyebrow){font-size:13px;line-height:1.7;color:var(--muted)}.empty-start>div{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:18px}@media(max-width:930px){.empty-start{left:50%;width:min(400px,calc(100% - 38px))}}@media(max-width:550px){.empty-start{top:58%;width:calc(100% - 34px)}.empty-start h1{font-size:25px}.empty-start p:not(.eyebrow){font-size:12px}.notification{padding:6px 10px calc(6px + env(safe-area-inset-bottom));font-size:10px}.file-actions{max-height:42vh}}
