:root { --paper:#f6f1e7; --ink:#292820; --muted:#706c60; --line:#a9a18d; --green:#355342; --green-soft:#dfebdf; --panel:#fffdf8; font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { min-width:320px; margin:0; color:var(--ink); background:var(--paper); }
.app-header { position:relative; z-index:4; display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:28px; padding:15px 30px; border-bottom:1px solid rgba(105,98,82,.22); background:var(--panel); }
.app-brand { color:var(--ink); font-family:Georgia,"Times New Roman",serif; font-size:1.8rem; letter-spacing:-.035em; text-decoration:none; white-space:nowrap; }
.tree-page { display:flex; flex-direction:column; height:100dvh; overflow:hidden; }.tree-page .app-header { flex-shrink:0; }.tree-page main { flex:1; min-height:0; }
.person-search { position:relative; justify-self:start; }
.account { position:relative; grid-column:3; justify-self:end; min-width:0; max-width:100%; }
.account-toggle { display:flex; align-items:center; gap:9px; max-width:100%; padding:6px 10px 6px 6px; border:1px solid rgba(105,98,82,.35); border-radius:9px; color:var(--ink); background:transparent; font:inherit; font-size:.88rem; cursor:pointer; }
.account-toggle:hover,.account-toggle[aria-expanded="true"] { background:var(--green-soft); border-color:var(--green); }
.account-avatar { position:relative; display:grid; flex:0 0 30px; width:30px; height:30px; place-items:center; overflow:hidden; border-radius:50%; color:var(--green); background:var(--green-soft); font-family:Georgia,"Times New Roman",serif; font-size:.72rem; }
.account-avatar img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.account-name { overflow:hidden; max-width:140px; text-overflow:ellipsis; white-space:nowrap; }
.account-chevron { width:6px; height:6px; margin:0 3px 3px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(45deg); }
.account-dropdown { position:absolute; top:calc(100% + 8px); right:0; min-width:180px; padding:6px; border:1px solid rgba(105,98,82,.25); border-radius:10px; background:var(--panel); box-shadow:0 10px 24px rgba(46,39,27,.12); }
.account-dropdown a,.account-dropdown button { display:block; width:100%; padding:10px 12px; border:0; border-radius:5px; color:var(--ink); background:none; font:inherit; font-size:.88rem; text-align:left; text-decoration:none; cursor:pointer; }
.account-dropdown a:hover,.account-dropdown button:hover { background:var(--green-soft); }
.account-dropdown button:disabled { opacity:.65; cursor:wait; }
.app-brand:focus-visible,.account-toggle:focus-visible,.account-dropdown a:focus-visible,.account-dropdown button:focus-visible { outline:2px solid var(--green); outline-offset:3px; }
.account-error { margin:6px 12px; max-width:180px; color:#9e3232; font-size:.8rem; }
.login-card button,.editor-actions button { padding:10px 14px; border:0; border-radius:8px; color:#fff; background:var(--green); font:inherit; cursor:pointer; }.login-card button:hover,.editor-actions button:hover { background:#294233; }
.eyebrow { margin:0 0 5px; color:var(--green); font-size:.68rem; font-weight:700; letter-spacing:.15em; text-transform:uppercase; }
h1,h2,h3,h4,p { margin-top:0; } h1,.person-panel h2,.tree-card h2 { font-family:Georgia,"Times New Roman",serif; font-weight:400; } h1 { margin-bottom:0; font-size:2.2rem; letter-spacing:-.035em; }
.person-search input { width:min(300px,42vw); padding:12px 14px; border:1px solid rgba(105,98,82,.35); border-radius:9px; color:var(--ink); background:var(--panel); font:inherit; }.person-search__results { position:absolute; top:calc(100% + 7px); left:0; z-index:5; width:100%; padding:7px 0; border:1px solid rgba(105,98,82,.25); border-radius:9px; background:var(--panel); box-shadow:0 10px 24px rgba(46,39,27,.12); }.person-search__results button { display:block; width:100%; padding:7px 13px; border:0; color:var(--green); background:none; font:inherit; text-align:left; cursor:pointer; }.person-search__results button:hover { background:var(--green-soft); }
.login-view { display:grid; min-height:100%; padding:32px 20px; place-items:center; }.login-card { width:min(420px,100%); padding:30px; border:1px solid rgba(105,98,82,.28); border-radius:14px; background:var(--panel); box-shadow:0 16px 38px rgba(46,39,27,.09); }.login-card h2 { margin-bottom:24px; font-family:Georgia,"Times New Roman",serif; font-size:1.8rem; font-weight:400; }.login-card label { display:block; margin-bottom:7px; font-size:.82rem; font-weight:600; }.login-card input { width:100%; padding:12px 14px; border:1px solid rgba(105,98,82,.35); border-radius:9px; color:var(--ink); background:#fff; font:inherit; }.login-card button { width:100%; margin-top:14px; }.login-card button:disabled { cursor:wait; opacity:.65; }.login-error { min-height:1.2em; margin:12px 0 0; color:#9e3232; font-size:.82rem; }
.explorer { position:relative; display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr); height:100%; min-height:0; overflow:hidden; }.tree-panel { position:relative; min-width:0; min-height:0; overflow:hidden; }.family-chart { width:100%; height:100%; min-height:0; }.family-chart #f3Canvas { position:relative; }.family-chart .links_view { display:none; }.family-chart .tree-connectors { position:absolute; inset:0; z-index:1; width:100%; height:100%; overflow:hidden; pointer-events:none; }.family-chart #htmlSvg { position:relative; z-index:2; }.tree-connectors__spouse,.tree-connectors__parent { fill:none; stroke:#817660; stroke-linecap:round; stroke-linejoin:round; stroke-width:2.25; vector-effect:non-scaling-stroke; }.tree-connectors__spouse { stroke-dasharray:5 5; }
.tree-card { display:flex; flex-direction:column; width:230px; padding:0; overflow:hidden; border:1px solid rgba(105,98,82,.28); border-radius:12px; background:var(--panel); box-shadow:0 11px 26px rgba(46,39,27,.08); cursor:pointer; }.tree-card:hover { border-color:var(--green); }.tree-card--documented { border-color:rgba(194,169,79,.78); }.family-chart .card-main .tree-card { border:2px solid var(--green); }.family-chart .card-main .tree-card--documented { border-color:rgba(194,169,79,.9); }.tree-card__body { display:flex; gap:11px; min-width:0; min-height:86px; padding:15px; }.tree-card__body>div { flex:1; min-width:0; }.tree-card__initials { display:grid; flex:0 0 36px; width:36px; height:36px; place-items:center; border-radius:50%; color:var(--green); background:var(--green-soft); font-family:Georgia,"Times New Roman",serif; font-size:.76rem; }.tree-card__avatar { display:block; flex:0 0 36px; width:36px; height:36px; border:1px solid rgba(105,98,82,.28); border-radius:8px; object-fit:cover; }.tree-card h2 { margin:0 0 5px; font-size:1.03rem; line-height:1.08; }.tree-card p { margin:0; color:var(--muted); font-size:.77rem; line-height:1.35; }.tree-card__dates { margin-top:5px !important; color:var(--green) !important; font-family:Georgia,"Times New Roman",serif; }.tree-card__footer { display:flex; align-items:center; justify-content:flex-start; width:100%; padding:9px 15px; border-top:1px solid rgba(105,98,82,.2); color:#6f6c61; font-size:.66rem; font-weight:400 !important; line-height:1; white-space:nowrap; }.tree-card__stat { display:flex; flex:0 0 50%; align-items:center; justify-content:flex-start; gap:4px; }.tree-card__stat:last-child { justify-content:flex-end; }.tree-card__footer .tree-card__count { font-weight:600 !important; }.tree-card__footer .tree-card__label { font-weight:400 !important; }.tree-card__footer svg { width:13px; height:13px; fill:none; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.8; }
.tree-card--potential:not(.tree-card--documented),.tree-card--potential:not(.tree-card--documented):hover,.family-chart .card-main .tree-card--potential:not(.tree-card--documented) { border-color:transparent; background:rgba(255,255,255,.55); box-shadow:none; }
.tree-card__initials--male { color:#235f9e; background:#dcecfb; }.tree-card__initials--female { color:#a9436b; background:#f9e1ea; }.tree-card__initials--unknown { color:#67717b; background:#e6e9ec; }
.person-panel { position:absolute; top:0; right:0; z-index:3; width:min(440px,100%); height:100%; min-height:0; padding:0; overflow:hidden; pointer-events:none; border-left:1px solid rgba(105,98,82,.22); background:#fff; box-shadow:-12px 0 28px rgba(46,39,27,.1); transform:translateX(100%); transition:transform .18s ease-out; }.sidebar-open .person-panel { pointer-events:auto; transform:translateX(0); }.panel-pane { height:100%; padding:32px 26px; overflow-y:auto; overscroll-behavior:contain; background:#fff; }.panel-drilldown { position:absolute; inset:0; z-index:2; transform:translateX(100%); transition:transform .18s ease-out; }.panel-drilldown.is-open { transform:translateX(0); }.panel-header,.drilldown-header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }.panel-header-actions { display:flex; gap:8px; }.person-heading { flex:1; }.person-panel h2 { margin-bottom:7px; font-size:1.8rem; letter-spacing:-.025em; line-height:1; }.person-vitals { margin:0; color:var(--muted); font-family:Georgia,"Times New Roman",serif; font-size:1rem; line-height:1.35; }.focus-button,.drilldown-back,.relationship-group button { border:0; color:var(--green); background:none; font:inherit; cursor:pointer; }.focus-button { position:relative; flex:0 0 34px; width:34px; height:34px; padding:0; border:1px solid rgba(53,83,66,.34); border-radius:50%; }.focus-button::before { position:absolute; inset:7px; border:2px solid currentColor; border-radius:50%; content:""; }.focus-button span { position:absolute; top:50%; left:50%; width:5px; height:5px; border-radius:50%; background:currentColor; transform:translate(-50%,-50%); }.focus-button:hover { background:var(--green-soft); }.drilldown-header { align-items:center; margin-bottom:28px; }.drilldown-back { padding:5px 0; font-weight:600; }.drilldown-back:hover { text-decoration:underline; text-underline-offset:.16em; }.panel-section { margin-top:28px; padding-top:22px; border-top:1px solid rgba(105,98,82,.18); }.relationship-group+.relationship-group { margin-top:16px; }.relationship-group h4 { margin:0 0 7px; color:var(--muted); font-size:.8rem; font-weight:600; }.relationship-group button { display:block; padding:2px 0; text-align:left; text-decoration:underline; text-underline-offset:.16em; }.relationship-detail { margin:2px 0 7px; color:var(--muted); font-size:.82rem; }.empty-state { margin:0; color:var(--muted); font-size:.88rem; }.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.person-profile p { line-height:1.5; }.profile-summary { margin-bottom:18px; }.profile-story+.profile-story,.profile-list { margin-top:18px; }.profile-story h4,.profile-list h4 { margin-bottom:7px; font-size:.9rem; }.profile-story p { margin:0; }.profile-story p+p { margin-top:10px; }.profile-list ul { margin:0; padding-left:19px; }.profile-list li { margin:6px 0; line-height:1.45; }.profile-list a { color:var(--green); }.profile-photos { display:grid; gap:12px; }.profile-photo { margin:0; }.profile-photo>a { display:block; cursor:zoom-in; }.profile-photo img { display:block; width:100%; border-radius:8px; }.profile-photo figcaption { margin-top:6px; color:var(--muted); font-size:.8rem; }
.markdown-body p,.markdown-body li { line-height:1.5; }.markdown-body p:last-child { margin-bottom:0; }.markdown-body a { color:var(--green); }.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4 { margin:18px 0 8px; font-family:inherit; font-size:1rem; font-weight:700; }.markdown-body ul,.markdown-body ol { padding-left:22px; }
.lore-new-entry { padding:0; border:0; color:var(--green); background:none; font:inherit; font-size:.86rem; font-weight:650; text-decoration:underline; text-underline-offset:.18em; cursor:pointer; }.lore-cards { display:grid; gap:10px; margin-top:14px; }.family-lore>.empty-state { margin-top:14px; }.lore-card { display:flex; align-items:center; gap:12px; width:100%; padding:12px; border:1px solid rgba(105,98,82,.24); border-radius:11px; color:var(--ink); background:var(--panel); text-align:left; cursor:pointer; }.lore-card:hover { border-color:var(--green); background:#fff; }.lore-avatar { display:block; flex:0 0 42px; width:42px; height:42px; border:1px solid rgba(105,98,82,.24); border-radius:9px; object-fit:cover; }.lore-avatar--initials { display:grid; place-items:center; border:0; border-radius:50%; font-family:Georgia,"Times New Roman",serif; font-size:.78rem; }.lore-avatar--male { color:#235f9e; background:#dcecfb; }.lore-avatar--female { color:#a9436b; background:#f9e1ea; }.lore-avatar--unknown { color:#67717b; background:#e6e9ec; }.lore-card__content { display:grid; min-width:0; gap:4px; }.lore-card__content strong { overflow:hidden; font-family:Georgia,"Times New Roman",serif; font-size:1rem; font-weight:400; text-overflow:ellipsis; white-space:nowrap; }.lore-card__content span { color:var(--muted); font-size:.76rem; line-height:1.35; }.lore-detail h2 { margin-bottom:18px; }.lore-source { display:flex; align-items:center; gap:11px; margin-bottom:26px; }.lore-source div { display:grid; gap:3px; }.lore-source strong { font-size:.87rem; }.lore-source span { color:var(--muted); font-size:.78rem; }.lore-detail__body { padding-top:22px; border-top:1px solid rgba(105,98,82,.18); }.lore-editor__subject { margin:-10px 0 24px; color:var(--muted); font-size:.86rem; }.lore-editor label { display:block; margin:18px 0 7px; font-size:.82rem; font-weight:650; }.lore-editor input,.lore-editor__body { width:100%; padding:12px 14px; border:1px solid rgba(105,98,82,.35); border-radius:9px; color:var(--ink); background:#fff; font:inherit; }.lore-editor__body { min-height:300px; border-radius:0 0 9px 9px; outline:none; overflow-y:auto; line-height:1.5; }.lore-editor__body:focus { border-color:#315f9b; box-shadow:0 0 0 1px #315f9b; }.lore-editor__body:empty::before { color:var(--muted); content:attr(data-placeholder); pointer-events:none; }.lore-editor__body p { margin:0 0 1em; }.lore-editor__body ul { padding-left:22px; }.rich-text-toolbar { display:flex; gap:4px; padding:6px; border:1px solid rgba(105,98,82,.35); border-bottom:0; border-radius:9px 9px 0 0; background:var(--paper); }.rich-text-toolbar button { min-width:34px; padding:5px 8px; border:0; border-radius:5px; color:var(--ink); background:transparent; font:inherit; font-size:.78rem; cursor:pointer; }.rich-text-toolbar button:hover { background:var(--green-soft); }.lore-editor__actions { display:flex; align-items:center; gap:14px; margin-top:22px; }.lore-save { padding:10px 14px; border:0; border-radius:8px; color:#fff; background:var(--green); font:inherit; cursor:pointer; }.lore-save:hover { background:#294233; }.lore-save:disabled { cursor:wait; opacity:.65; }.lore-delete { margin-left:auto; padding:0; border:0; color:#9e3232; background:none; font:inherit; text-decoration:underline; text-underline-offset:.18em; cursor:pointer; }.lore-editor__error { min-height:1.2em; margin:14px 0 0; color:#9e3232; font-size:.82rem; }
.page-title { margin-bottom:28px; text-align:center; }
.profile-editor-shell { width:min(860px,100%); margin:0 auto; padding:40px 24px 72px; }.profile-editor { padding:30px; border:1px solid rgba(105,98,82,.28); border-radius:14px; background:var(--panel); box-shadow:0 16px 38px rgba(46,39,27,.07); }.editor-section+.editor-section { margin-top:30px; padding-top:26px; border-top:1px solid rgba(105,98,82,.18); }.editor-section h2 { margin-bottom:8px; font-family:Georgia,"Times New Roman",serif; font-size:1.55rem; font-weight:400; }.editor-section h3 { margin:20px 0 10px; font-size:.73rem; letter-spacing:.13em; text-transform:uppercase; }.editor-section label { display:block; margin-bottom:7px; font-size:.82rem; font-weight:600; }.editor-section input,.editor-section textarea { width:100%; padding:12px 14px; border:1px solid rgba(105,98,82,.35); border-radius:9px; color:var(--ink); background:#fff; font:inherit; }.editor-section input { max-width:260px; }.editor-section textarea { min-height:220px; resize:vertical; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; line-height:1.5; }.avatar-editor { display:flex; align-items:flex-start; gap:16px; }.avatar-preview { display:block; flex:0 0 80px; width:80px; height:80px; border:1px solid rgba(105,98,82,.28); border-radius:12px; object-fit:cover; }.avatar-editor .editor-help { margin-top:8px; }.editor-help { margin:0 0 12px; color:var(--muted); font-size:.84rem; line-height:1.5; }.recorded-value { margin-bottom:5px; font-family:Georgia,"Times New Roman",serif; font-size:1.1rem; }.editor-actions { display:flex; align-items:center; gap:14px; margin-top:24px; }.editor-actions button:disabled { cursor:wait; opacity:.65; }.editor-actions p { margin:0; color:var(--muted); font-size:.84rem; }.profile-editor-shell>div>.panel-section { margin-top:30px; padding:26px 30px; border:1px solid rgba(105,98,82,.28); border-radius:14px; background:var(--panel); }
.panel-section-title { margin:0 0 12px; color:var(--ink); font-size:.83rem; text-transform:uppercase; }
.lore-author-link { padding:0; border:0; color:var(--ink); background:none; font:inherit; font-size:.87rem; font-weight:650; text-align:left; text-decoration:underline; text-underline-offset:.16em; cursor:pointer; }
.artifact-cards { margin:0 0 18px; }.artifact-card { text-decoration:none; }.artifact-card__icon { display:grid; flex:0 0 42px; width:42px; height:42px; place-items:center; border:1px solid rgba(105,98,82,.24); border-radius:9px; color:var(--green); background:var(--green-soft); }.artifact-card__icon svg { width:25px; height:25px; fill:none; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.6; }
@media (max-width:820px) { .explorer { overflow:hidden; }.tree-panel { overflow:visible; }.family-chart { height:100%; min-height:0; }.person-panel { width:100%; border-left:0; } }
@media (max-width:700px) { .app-header { grid-template-columns:auto minmax(0,1fr); gap:12px; padding:14px 16px; }.app-brand { font-size:1.4rem; }.account { grid-column:2; grid-row:1; }.account-name { max-width:90px; }.person-search { grid-column:1 / -1; grid-row:2; width:100%; }.person-search input { width:100%; }.family-chart { height:100%; min-height:0; } }
