/* Linaje nocturno: preview based on the approved visual reference. */
:root{--bg:#041226;--paper:#091d38;--ink:#e8effc;--muted:#9bb3d3;--line:#23456f;--sage:#0c2548;--accent:#64b6ff;--danger:#ffaaa5}
body{background:radial-gradient(ellipse at 72% 0,#0b264a 0,transparent 45%),#041226;color:var(--ink);min-height:100vh}
h1,h2,h3{font-family:"Libre Caslon Display",Georgia,serif;font-weight:400;letter-spacing:-.4px}
header{max-width:none;padding:22px 4%;min-height:108px;background:linear-gradient(120deg,#0b203c,#0b2447);border-bottom:1px solid #24466f;gap:30px}
.brand{font-family:"Libre Caslon Display",Georgia,serif;font-size:32px;letter-spacing:0;gap:17px;white-space:nowrap}.brand small{font-family:"DM Sans",sans-serif;font-size:8px;color:#89acd8;letter-spacing:2.2px;margin-top:7px}
.family-crest{height:66px;width:50px;object-fit:contain;border-radius:4px}.head-right{margin-left:auto;font-size:13px;gap:12px}.account-avatar{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;border:1px solid #397ac4;background:#0e315b;font-family:Georgia;font-size:22px;box-shadow:inset 0 0 15px #2466ac24}.preview-badge{color:#7fa7db;font-size:8px;letter-spacing:1.4px}
body:not(.workspace-open) .account-avatar,body:not(.workspace-open) .account-copy,body:not(.workspace-open) header .tabs{display:none}
header .tabs{border:0;align-self:stretch;align-items:stretch;gap:30px;margin:-22px 0 -22px;padding:0 0 0 25px;border-left:1px solid #23456f66}
header .tabs button{padding:31px 0;font-size:13px;color:#b4c5e0;border-bottom:3px solid transparent;white-space:nowrap}
header .tabs button.active{color:#f2f6ff;border-color:#62b6ff}.tabs button:hover{color:#fff}
main{max-width:1680px;padding:0 44px}.page-top{display:block;text-align:center;padding:46px 0 27px}.page-top .eyebrow,.stats{display:none}.page-top h1{font-size:clamp(45px,5vw,78px);letter-spacing:-1px;margin-bottom:10px;line-height:1.08}.page-top p{max-width:950px;margin:0 auto;color:#a0b7d7;font-size:16px;line-height:1.55}
#relationship>.section-copy,#queries>.section-copy,#admin>.section-copy{display:none}
.compare-card{display:grid;grid-template-columns:minmax(0,1fr) 56px minmax(0,1fr) 218px;gap:20px;background:none;border:0;padding:0;margin:0;align-items:start}
.compare-card>div{min-width:0}.compare-card .picker label{font-size:0;margin:0}.compare-card input{margin:0;padding:18px 44px 18px 46px;height:59px;font-size:15px;border:1px solid #355478;background:#0b1c34;border-radius:10px;box-shadow:inset 0 1px 2px #ffffff05;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%239bb7db'%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3Cpath d='M4 22v-3a8 8 0 0116 0v3z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:17px center;background-size:19px}
.compare-card .selected-person{font-size:10px;margin-top:5px;min-height:17px;color:#8da8ca}
.swap{height:59px;width:56px;align-self:start;border-radius:10px;background:linear-gradient(#11335b,#0c2447);border:1px solid #2b568c;font-size:29px;color:#c4dfff}
#compare{height:59px;font-size:14px;display:flex;align-items:center;justify-content:center;gap:12px;padding:14px;white-space:nowrap}#compare>span{font-size:29px;line-height:1}
.primary{background:linear-gradient(125deg,#4399ff,#0867fa);border:1px solid #5aa9ff;color:#fff;box-shadow:inset 0 1px 1px #c7e4ff40,0 3px 18px #1268ed1a;border-radius:9px}.primary:hover{background:linear-gradient(125deg,#5aa8ff,#1877ff)}
.secondary,.quiet{border:1px solid #2d5789;color:#d2e4fc;background:#0a203c;border-radius:8px}.secondary:hover,.quiet:hover{background:#12355e}.link{color:#aacfff}label{color:#c9d9ef}input,select,textarea{background:#071a32;color:#e7effc;border-color:#2a4b76;border-radius:7px}select option{background:#0b213e}input::placeholder,textarea::placeholder{color:#6e8db5}input:focus,select:focus,textarea:focus{outline:2px solid #4b9efa80;border-color:#5bb6ff;outline-offset:1px}button:focus-visible,a:focus-visible{outline-color:#77cbff}
.suggestions{top:63px;background:#0b2342;border:1px solid #426595;border-radius:10px;box-shadow:0 15px 40px #0008}.suggestions button{color:#e0eafd;border-color:#25466d;font-size:13px}.suggestions button:hover{background:#143b68}.suggestions small{color:#9fbada}
.result-area{margin-top:18px}.result-card{background:none;padding:0;border:0}.result-summary{position:relative;background:linear-gradient(110deg,#0b213e,#0a1d37 50%,#0a2245);border:1px solid #204c7f;border-radius:11px;padding:23px 175px;margin:0 0 24px;min-height:94px;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;box-shadow:inset 0 0 30px #0e376d25}
.result-summary:before,.result-summary:after{content:"";position:absolute;width:12%;top:50%;height:1px;background:linear-gradient(90deg,transparent,#34659c)}.result-summary:before{left:3%}.result-summary:after{right:3%;transform:rotate(180deg)}
.result-summary>.eyebrow{display:none}.result-summary>p{font-size:10px;color:#8daacd;margin:0 0 6px}.result-summary h2{font-size:39px;margin:0;letter-spacing:0}.result-summary h2 strong{font-weight:400;color:#6dbdff}.result-summary h2 span{color:#e0eafd}
#invert-result{position:absolute;right:18px;bottom:10px;border-color:#244e7c;background:#0c2749;color:#abc8eb;font-size:10px;padding:5px 9px;z-index:1}.result-summary p:last-child:not(:first-child){font-size:10px;color:#91afd2;margin:10px 0 0}
.relationship-tree{position:relative;margin:0 -25px;padding:21px 24px 18px;border:1px solid #234e7d;border-radius:13px;background:#041429;box-shadow:inset 0 0 60px #051f4255;overflow:hidden}
.tree-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:12px}.tree-heading h3{font-size:22px;margin:0 0 5px}.tree-heading p{font-size:10px;max-width:none;color:#7b9cc5;margin:0}
.tree-controls{gap:5px}.tree-controls button{border-color:#284f7f;background:#091f3b;color:#bdd7f5;border-radius:6px;font-size:10px;padding:5px 9px}.tree-controls button:hover{background:#12365f}
.tree-view-toolbar{display:flex;align-items:center;flex-wrap:wrap;margin:0 0 12px;gap:15px}.tree-segments{display:flex;align-items:stretch;gap:0;border:1px solid #294f7b;border-radius:8px;background:#06182f;padding:3px}
.tree-segments button{margin:0;padding:11px 16px;min-height:42px;font-size:11px;color:#b5c9e4;border:1px solid transparent;border-radius:6px;background:none;white-space:nowrap;line-height:1.3}
.tree-segments [aria-pressed=true],.tree-segments [aria-checked=true]{background:linear-gradient(120deg,#18457b,#103561);border-color:#388cf5;color:#e9f3ff;box-shadow:inset 0 0 0 1px #388cf54d,0 0 12px #1679ed20}
.tree-segments .switch-track{display:none}.tree-segments .direct-view:before{content:"↟";margin-right:9px;font-size:16px}.tree-view-switch:before{content:"♧";margin-right:3px;font-size:17px}.tree-view-info{font-size:10px;min-width:120px;color:#7f9fc9}.tree-view-toolbar>[data-export-pdf]{margin-left:auto;min-height:45px;padding:11px 18px;font-size:11px;background:#081d37;border-color:#315b90;color:#d2e3fa}
.tree-legend{font-size:9px;color:#7f9ec5;gap:16px;margin:8px 0 12px}.tree-legend span:before{background:#6189b7;width:7px;height:7px}.tree-legend .legend-a:before{background:#6c9cff}.tree-legend .legend-b:before{background:#61d4f2}
.tree-viewport{border:0;border-radius:7px;max-height:760px;min-height:390px;background:linear-gradient(#04132955,#04132977),url('/night-oak.png') center center/cover no-repeat,#041329;scrollbar-color:#274e7b #06182e;scrollbar-width:thin}
.tree-canvas{background:none}.tree-edge{stroke:#315b87;stroke-width:1.8}.tree-edge.lit{stroke:#53b7ee;stroke-width:3;filter:drop-shadow(0 0 3px #369fe67a)}.tree-edge.spouse{stroke-dasharray:6 5}
.tree-node{border-radius:10px;background:linear-gradient(120deg,#0b1e37f5,#0b203cf5);border:1.5px solid #5978a4;color:#edf3ff;box-shadow:0 3px 18px #0004;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:10px;padding:13px 12px;line-height:1.25}
.tree-node .node-copy{min-width:0;display:block}.tree-node strong{font-family:"Libre Caslon Display",Georgia,serif;font-size:17px;font-weight:400;line-height:1.07;-webkit-line-clamp:3}.tree-node small{font-size:9px;color:#aec8e9;margin-top:7px;-webkit-line-clamp:1}.tree-node .tree-marker{position:absolute;top:7px;left:74px;font-size:6px;letter-spacing:1px;color:#a0caed}
.tree-node.on-route{background:linear-gradient(115deg,#0c203bf5,#0b2343f5);border-color:#6485b3}.tree-node.selected-a{border:2px solid #8cb8ff;background:linear-gradient(110deg,#335cb1f5,#254b96f5);box-shadow:0 0 0 2px #679de71a,0 0 22px #377cf43d}.tree-node.selected-b{border:2px solid #61d3f7;background:linear-gradient(115deg,#0b426bf5,#0b2c50f5);box-shadow:0 0 0 2px #64c8ee14,0 0 20px #36b2ec3d}
.portrait{position:relative;display:inline-grid;place-items:center;width:49px;height:49px;flex:0 0 49px;overflow:hidden;border-radius:50%;border:1px solid #9bb7d9;background:radial-gradient(circle at 30% 20%,#426995,#153654);font-family:Georgia,serif;font-size:17px;color:#dcecff;box-shadow:0 2px 7px #0003}
.portrait img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;object-position:center}.portrait-large{width:100px;height:100px;flex-basis:100px;font-size:30px;border:2px solid #7c9ec4}
.tree-focus-controls button{background:#0b2444;border-color:#28517e;color:#b4d0f0;border-radius:5px}.relationship-tree>.caption{font-size:10px;color:#7798c1;margin:12px 0 0}.result-card>.caption{font-size:10px;color:#688ab5}
.card,.login-card{background:linear-gradient(130deg,#0b203a,#091b33);border:1px solid #26456d;border-radius:11px;box-shadow:0 8px 30px #0002}
.card h3{color:#e4eefc}.writing-query{background:linear-gradient(140deg,#0e2b50,#0b203a)}
.person-row{background:#0a203c;border-color:#26476f;border-radius:7px}.person-row small{color:#8ea9ce}.person-row button{color:#71b4fc}
.person-chip{background:#0e2a4c;border:1px solid #305781;color:#cee2fc;border-radius:6px}.pending{border-color:#244165}.unknown{color:#7893b8}.surname-list div{background:#0a213e;border-color:#25466e;border-radius:6px}.surname-list span{color:#7898c2}
.message:not(:empty){background:#102d51;border-color:#69b6fc}.message.error{background:#37202a;border-color:#eb8b93;color:#ffb7b9}.danger{color:#ffa8a2!important}
.profile-heading{display:flex;align-items:center;gap:24px;margin:12px 0 18px}.profile-heading h3{font-size:42px;margin:0}.person-profile dl{display:grid;grid-template-columns:1fr 1fr;gap:0 24px}.person-profile>.eyebrow{margin-bottom:8px}
.photo-editor{display:flex;align-items:center;gap:24px;padding:23px;border:1px solid #2d527d;border-radius:10px;background:#081b33;margin:20px 0 30px}.photo-editor>div:last-child{flex:1;min-width:0}.photo-editor strong{font-size:14px;color:#d9e9ff}.photo-editor p{font-size:11px;color:#8faacc;margin:7px 0 12px}.photo-actions{display:flex;gap:9px;flex-wrap:wrap}.photo-actions button{font-size:11px;padding:8px 13px}.photo-file{font-size:11px;max-width:380px;margin-bottom:12px}.photo-file input{font-size:11px;padding:8px}.photo-file input::file-selector-button{background:#123d6a;color:#d3e9ff;border:1px solid #426f9c;border-radius:4px;padding:5px 8px;margin-right:10px}.photo-editor .caption{font-size:10px;margin-bottom:0}
.common-children-panel{background:#0c2545;border-color:#2c527f;border-radius:8px}.common-children-panel fieldset{background:#081d36;border-color:#2b4e78}.common-child{border-color:#24456e}.common-child input{accent-color:#2681ed}
.empty{border:1px solid #234b78;border-radius:12px;min-height:480px;background:linear-gradient(#04132966,#041329aa),url('/night-oak.png') center/cover no-repeat;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:75px 25px;color:#8badd2}.empty>span{color:#77b1ed;font-size:58px;line-height:1}.empty h3{color:#d8e8ff;font-size:32px;margin:16px 0 10px}.empty p{font-size:13px;max-width:400px}
.auth-wrap{min-height:calc(100vh - 210px)}.intro h1{font-size:72px;color:#e2edff}.intro>p{color:#95b0d3}.lineage-art{background:linear-gradient(135deg,#0e2b4b,#06172d);color:#7198c5}.lineage-art span{background:#0c2544;border-color:#2a537f}.lineage-art i{background:#2d527d}
.login-card>p{color:#93afd1}.eyebrow{color:#7cb8f5}.caption{color:#88a4c9}.surname-assist p{color:#8ca8cc}
footer{max-width:1680px;padding:24px 44px;margin-top:20px;border-color:#203e63;font-size:9px;letter-spacing:2px;color:#6c90bd}footer span{color:#708fb5}
@media(min-width:1550px){main{padding:0 75px}.relationship-tree{margin-left:-50px;margin-right:-50px}.tree-viewport{max-height:850px}}
@media(max-width:1150px){header{gap:20px;padding-left:28px;padding-right:28px}.brand{font-size:27px}.brand small{display:none}.family-crest{height:56px;width:42px}header .tabs{gap:20px;padding-left:18px}header .tabs button{font-size:11px}.head-right{gap:8px}.account-avatar{width:34px;height:34px;font-size:18px}.head-right #account{font-size:11px}.head-right #logout{padding:8px;font-size:10px}.compare-card{grid-template-columns:minmax(0,1fr) 46px minmax(0,1fr) 165px;gap:14px}.swap{width:46px}.compare-card input{font-size:13px;padding-left:39px;background-position:12px center}#compare{font-size:12px}.page-top h1{font-size:59px}.page-top p{font-size:14px}.result-summary{padding:22px 140px}.result-summary h2{font-size:33px}.result-summary:before,.result-summary:after{width:8%}.tree-view-info{flex-basis:100%;order:3}}
@media(max-width:800px){header{padding:16px 20px;flex-wrap:wrap;gap:15px;min-height:80px}.brand{font-size:27px;gap:10px}.family-crest{width:35px;height:47px}.head-right{max-width:45%;gap:7px}.head-right #account{font-size:11px;max-width:100px}.preview-badge{font-size:7px}.account-avatar{width:28px;height:28px;font-size:16px}.head-right #logout{font-size:9px;padding:6px}
header .tabs{order:3;flex-basis:calc(100% + 40px);margin:0 -20px -16px;padding:0 20px;gap:24px;border-left:0;border-top:1px solid #23456f77;overflow:auto;min-width:0}
header .tabs button{padding:14px 0;font-size:11px}
main{padding:0 18px}.page-top{padding:29px 0 24px}.page-top h1{font-size:43px;line-height:1.05;letter-spacing:-.7px;margin-bottom:15px}.page-top p{font-size:12px;max-width:350px}
.compare-card{grid-template-columns:1fr 42px;gap:10px;padding:0;margin:0}.compare-card #picker-a{grid-column:1}.compare-card #picker-b{grid-column:1}.compare-card .swap{grid-column:2;grid-row:1/3;height:45px;width:42px;align-self:center;transform:rotate(90deg);font-size:25px}.compare-card input{height:51px;font-size:12px;padding:13px 32px 13px 39px}.compare-card .selected-person{font-size:9px;min-height:12px;margin-top:4px}.compare-card #compare{grid-column:1/-1;width:100%;height:49px;margin:2px 0 0;font-size:13px}
.result-area{margin-top:17px}.result-summary{padding:20px 18px 38px;min-height:100px;margin-bottom:18px}.result-summary h2{font-size:30px}.result-summary>p{font-size:9px;max-width:280px}.result-summary:before,.result-summary:after{display:none}#invert-result{right:12px;bottom:8px;padding:3px 7px;font-size:9px}
.relationship-tree{margin:0 -7px;padding:14px 12px 12px;border-radius:11px}.tree-heading{gap:12px;align-items:start}.tree-heading h3{font-size:22px;margin-bottom:5px}.tree-heading p{font-size:9px;max-width:220px}.tree-controls{display:flex;margin:0;flex-shrink:0;gap:3px}.tree-controls button{padding:5px 6px;font-size:9px}.tree-view-toolbar{gap:10px;margin-bottom:10px}.tree-segments{width:100%;padding:2px}.tree-segments button{padding:10px 9px;font-size:9px;min-height:40px}.tree-segments .direct-view{flex:1}.tree-segments .tree-view-switch{flex:2;justify-content:center}.tree-segments .direct-view:before{font-size:13px;margin-right:5px}.tree-view-switch:before{font-size:13px}.tree-view-info{order:0;flex-basis:auto;min-width:0;font-size:8px;flex:1}.tree-view-toolbar>[data-export-pdf]{margin-left:auto;padding:8px 9px;min-height:32px;font-size:9px}.tree-legend{font-size:8px;gap:12px}.tree-viewport{min-height:330px;max-height:580px;background-position:center}.tree-focus-controls{gap:6px}.tree-focus-controls button{font-size:9px;padding:5px 7px}.relationship-tree>.caption,.result-card>.caption{font-size:9px}
.card{padding:21px}.profile-heading{gap:16px;align-items:center}.profile-heading h3{font-size:30px}.profile-heading .portrait-large{width:76px;height:76px;flex-basis:76px}.person-profile dl{grid-template-columns:1fr}.person-profile .pending{font-size:12px}.photo-editor{padding:17px;align-items:flex-start;gap:16px;flex-wrap:wrap}.photo-editor .portrait-large{width:76px;height:76px;flex-basis:76px}.photo-editor>div:last-child{flex-basis:100%}.photo-actions button{font-size:11px}
.empty{min-height:400px;padding:50px 20px}.empty h3{font-size:29px}.empty p{font-size:11px;max-width:280px}.auth-wrap{gap:30px;padding:35px 0;min-height:0}.intro h1{font-size:49px}.intro>p{font-size:13px}.login-card{padding:25px}.login-card h2{font-size:32px}.login-card>p{font-size:12px}.admin-toolbar{gap:10px}.admin-toolbar>#picker-admin{grid-column:1/-1}.admin-toolbar button{font-size:10px;padding:10px}
footer{padding:20px;gap:15px;font-size:8px}footer span{max-width:170px}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important}}

.tree-size{margin-left:auto;margin-right:auto}

/* Circular portrait framing, mouse/touch and keyboard controls. */
.photo-editor.is-cropping{align-items:center;flex-wrap:wrap}
.photo-editor.is-cropping #photo-preview{flex:0 0 260px;width:260px;max-width:100%}
#portrait-crop{display:block;width:260px;height:260px;max-width:100%;border-radius:50%;border:2px solid #6fb8ff;box-shadow:0 0 0 8px #183f692e,0 10px 35px #0004;cursor:grab;touch-action:none;background:#081b33}
#portrait-crop:active{cursor:grabbing}
#portrait-crop:focus-visible{outline:3px solid #96d8ff;outline-offset:7px}
.photo-editor-body{min-width:0;flex:1}
#crop-controls{max-width:440px;padding:15px 0;margin:5px 0 16px;border-top:1px solid #284b75;border-bottom:1px solid #284b75}
#crop-controls label{font-size:11px;margin:0 0 13px}
#crop-controls input[type=range]{padding:0;height:24px;margin:5px 0 0;accent-color:#5dacf9;cursor:pointer;background:transparent;border:0}
#crop-zoom-value{float:right;color:#96cafd;font-variant-numeric:tabular-nums}
@media(max-width:800px){.photo-editor.is-cropping #photo-preview{flex:0 0 230px;width:230px;margin:5px auto 14px}#portrait-crop{width:230px;height:230px}#crop-controls{max-width:100%}.photo-actions{gap:8px}.photo-actions button{min-height:36px}}

/* Preview: smaller section headings and a lighter blue fill. */
:root{--bg:#102b49;--paper:#16395f;--line:#3a6087;--sage:#1b416a;--muted:#b4c9e3}
body{background:radial-gradient(ellipse at 72% 0,#234b77 0,transparent 53%),#102b49}
header{background:linear-gradient(120deg,#193c62,#163759);border-bottom-color:#3a6087}
.page-top h1{font-size:clamp(36px,3.6vw,52px);line-height:1.12}
.card,.login-card{background:linear-gradient(130deg,#1b3e64,#153657);border-color:#3a6087}
.writing-query{background:linear-gradient(140deg,#224b76,#1a3b61)}
input,select,textarea,.compare-card input{background-color:#153555;border-color:#477098}
select option{background:#173b60}
.suggestions{background:#193d64;border-color:#527ca7}
.suggestions button{border-color:#355b83}.suggestions button:hover{background:#28527d}
.result-summary{background:linear-gradient(110deg,#21476f,#1a3b61 50%,#20456e);border-color:#49739d}
.relationship-tree{background:#102f50;border-color:#436c96}
.tree-viewport{background:linear-gradient(#244d7588,#1d416599),url('/night-oak.png') center center/cover no-repeat,#163657}
.empty{background:linear-gradient(#244d7599,#1d4165bb),url('/night-oak.png') center/cover no-repeat;border-color:#436c96}
.tree-node,.tree-node.on-route{background:linear-gradient(120deg,#20476df5,#193b5df5)}
.tree-node.selected-a{background:linear-gradient(110deg,#335cb1f5,#254b96f5)}
.tree-node.selected-b{background:linear-gradient(115deg,#15587ff5,#10436af5)}
.person-row{background:#1a3e65;border-color:#476f99;color:var(--ink);text-align:left}
.person-row strong{color:var(--ink);font-weight:600}.person-row small{color:#b5cce7}
.resolve-person{width:100%;font-size:inherit;font-weight:400}
.resolve-person:hover{background:#24517e;border-color:#7aa4d0}
.person-row-copy{min-width:0}.person-row-open{color:#9bcfff;font-size:17px;flex-shrink:0}
.person-chip{background:#21486f;border-color:#517aa3}
.surname-list div{background:#1a3d61;border-color:#456c93}
.photo-editor,.common-children-panel fieldset{background:#153555;border-color:#426b96}
.common-children-panel{background:#1b3d63;border-color:#426b96}
.secondary,.quiet,.tree-controls button{background:#1b4168;border-color:#4b749c}
footer{border-color:#3a6087}
@media(max-width:1150px){.page-top h1{font-size:44px}}
@media(max-width:800px){.page-top h1{font-size:34px}}

.profile-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 0 16px;flex-wrap:wrap}
.profile-actions button{font-size:12px;padding:10px 16px}
.profile-actions [data-edit-profile]{margin-left:auto}
@media(max-width:800px){.profile-actions{gap:10px}.profile-actions button{font-size:11px;padding:10px 13px}}

/* Original transparent family emblem in the two requested locations. */
header .family-crest{width:62px;height:76px;object-fit:contain;border-radius:0}
.empty .empty-crest{display:block;width:132px;height:144px;object-fit:contain;margin:0 0 15px;filter:drop-shadow(0 5px 16px #0002)}
@media(max-width:800px){header .family-crest{width:44px;height:54px}.empty .empty-crest{width:112px;height:122px}}

/* Preview: readable person records and administration, with family emblems. */
:root{--record-font-size:15px}
.person-profile .pending,.person-profile .person-chip{font-size:var(--record-font-size)}
.person-profile .caption{font-size:13px}
.person-profile h4{font-size:18px}
.profile-actions button{font-size:14px}
.profile-heading h3{flex:1;min-width:0;overflow-wrap:anywhere}
.profile-crest{display:block;width:70px;height:84px;object-fit:contain;flex:0 0 70px;margin-left:auto}
#admin label,#admin input,#admin select,#admin textarea,#admin .person-chip,#admin .pending,#admin .relation-item{font-size:var(--record-font-size)}
#admin .caption,#admin .selected-person,#admin .photo-editor p,#admin .photo-file,#admin .common-child small,#admin .surname-assist p{font-size:13px}
#admin .primary,#admin .secondary,#admin .quiet,#admin .photo-actions button,#admin .photo-file input{font-size:14px}
#admin .common-children-panel p,#admin .common-children-panel legend{font-size:14px}
#admin .photo-editor strong{font-size:16px}
header .tabs button{font-size:15px}
.tree-heading-copy{display:grid;grid-template-columns:54px minmax(0,1fr);column-gap:15px;min-width:0;align-items:center}
.tree-crest{grid-column:1;grid-row:1/3;width:54px;height:64px;object-fit:contain}
.tree-heading-copy h3,.tree-heading-copy p{grid-column:2}
.tree-heading-copy h3{align-self:end}.tree-heading-copy p{align-self:start}
@media(max-width:1150px) and (min-width:801px){header .tabs{gap:18px}header .tabs button{font-size:14px}}
@media(max-width:800px){
 header .tabs{gap:20px}header .tabs button{font-size:13px}
 .person-profile .pending,.person-profile .person-chip{font-size:var(--record-font-size)}
 .profile-heading{display:grid;grid-template-columns:56px minmax(0,1fr) 44px;gap:12px}
 .person-profile .profile-heading>.portrait{width:56px;height:56px;font-size:23px}
 .profile-heading h3{font-size:28px;line-height:1.1}
 .profile-crest{width:44px;height:56px}
 .tree-heading-copy{grid-template-columns:38px minmax(0,1fr);column-gap:9px}
 .tree-crest{width:38px;height:48px}
 .tree-heading-copy h3{font-size:20px}
 .tree-heading{gap:8px}
}


/* Foto de la cuenta y contador del archivo. */
.account-avatar{flex-shrink:0;overflow:hidden}
.account-avatar>.portrait{width:100%;height:100%;min-width:0;flex-basis:auto;border:0;border-radius:inherit;font-size:inherit;box-shadow:none}
.account-copy{display:flex;flex-direction:column;min-width:0;line-height:1.4}
.archive-count{font-size:11px;color:#b0c6e2;white-space:nowrap;margin-top:3px}
.archive-count strong{font-weight:600;color:#dceaff}
@media(max-width:1150px){header{gap:18px}header .tabs{gap:20px;padding-left:16px}}
@media(max-width:800px){.head-right{max-width:100%}.head-right #account{max-width:none}.archive-count{font-size:11px}header{gap:14px}.account-avatar{width:32px;height:32px}}

/* Longer spouse connections retain proper-name capitalization. */
.result-summary.is-spouse h2{font-size:clamp(25px,2.5vw,34px);line-height:1.2;overflow-wrap:anywhere}

/* One-touch clear buttons for person searches and the written query. */
.search-field{position:relative;margin-top:7px}
.search-field+.suggestions{top:auto;margin-top:4px}
.search-field input,.search-field textarea{margin-top:0;padding-right:51px}
.compare-card .search-field{margin-top:0}
.compare-card .search-field input{padding-right:51px}
.search-field .clear-search{position:absolute;top:50%;right:4px;transform:translateY(-50%);display:grid;place-items:center;width:40px;height:40px;padding:0;border:0;border-radius:6px;background:transparent;color:#bed6f3;font:inherit;font-size:24px;line-height:1;cursor:pointer}
.search-field .clear-search:hover{background:#4177af33;color:#fff}
html[data-theme=light] .search-field .clear-search{color:#345e89}
html[data-theme=light] .search-field .clear-search:hover{background:#dbeafd;color:#153e6b}
.search-field input[type=search]::-webkit-search-cancel-button,.search-field input[type=search]::-webkit-search-decoration{-webkit-appearance:none;appearance:none}
.writing-query .natural-query-label{margin-bottom:0}
.search-field--textarea{margin-bottom:20px}
.search-field--textarea .clear-search{top:4px;transform:none}
@media(max-width:800px){.search-field .clear-search{width:44px;height:44px;right:2px}.search-field input,.search-field textarea,.compare-card .search-field input{padding-right:53px}}

/* Keep marriages outside the highlighted route visible on the dark tree. */
html[data-theme=dark] .tree-edge.spouse:not(.lit){stroke:#9fbfe3;stroke-width:2.6;opacity:1}

.death-status-note{display:block;margin-top:8px;font-size:13px;font-weight:400;line-height:1.5;color:var(--muted)}

/* Password visibility control, shared by sign-in, account creation and reset. */
.password-field{margin-bottom:20px}
.password-field>label{margin-bottom:0}
.password-input{position:relative;margin-top:7px}
.password-input input{margin-top:0;padding-right:54px}
.password-toggle{position:absolute;right:3px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--ink);cursor:pointer}
.password-toggle:hover{background:#4177af33}
html[data-theme=light] .password-toggle:hover{background:#dbeafd}
.password-eye-slash{display:none}
.password-toggle[data-visible=true] .password-eye-slash{display:block}
#password::-ms-reveal,#password::-ms-clear{display:none}
