:root{font-family:Arial,Helvetica,sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none;color-scheme:dark;--bg:#121016;--panel:#221e2c;--ink:#f3eff8;--muted:#bcb3c9;--g:#f28cb3;--c:#ba9aef;--h:#57d9bf;--border:#44394f;--wash:#30263e;--active:#6b4d95;--focus:#d6b66b}:root[data-theme=light]{color-scheme:light;--bg:#fbf9fc;--panel:#fff;--ink:#211b2b;--muted:#686372;--g:#b33565;--c:#6346a6;--h:#087866;--border:#ddd8e2;--wash:#f0ebf8;--active:#312331;--focus:#997313}*{box-sizing:border-box}body{margin:0}.signature{height:6px;background:linear-gradient(to right,#ff0077 0% 16.66%,#ffb0ca 16.66% 33.33%,#ac6bf1 33.33% 50%,#5300f1 50% 66.66%,#00ffcc 66.66% 83.33%,#a8f1f1 83.33%)}button,input,select{font:inherit}button,a,input,select,summary{outline-offset:4px}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid var(--focus)}button{cursor:pointer}a{color:var(--c)}.top{display:flex;align-items:center;justify-content:space-between;gap:30px;padding:32px 3vw 24px}.eyebrow{font-size:12px;letter-spacing:1.6px;font-weight:700;color:var(--muted)}h1{font-size:clamp(26px,2.3vw,64px);letter-spacing:-1.4px;margin:12px 0}p{line-height:1.5}.top p{margin:0;color:var(--muted);font-size:clamp(14px,1vw,26px)}.head-actions{display:flex;gap:28px;align-items:center}.snapshot{line-height:1.6;font-size:14px;white-space:nowrap}.snapshot small{color:var(--muted)}.button,button{border:1px solid var(--border);background:var(--panel);color:var(--ink);padding:10px 15px;border-radius:7px;text-decoration:none}.button{white-space:nowrap;font-weight:700}main{padding:0 3vw 28px}.metrics{display:grid;grid-template-columns:repeat(5,1fr);gap:15px;margin:10px 0 24px}.metrics button{display:flex;align-items:center;text-align:left;gap:18px;padding:18px 22px;border-top:4px solid var(--ink)}.metrics button:nth-child(2){border-color:var(--border);border-top-color:var(--g)}.metrics button:nth-child(3){border-top-color:var(--c)}.metrics button:nth-child(4){border-top-color:var(--h)}.metrics b{font-size:clamp(26px,2.2vw,60px);letter-spacing:-2px}.metrics span{font-weight:700;font-size:clamp(13px,.9vw,25px)}.metrics small{display:block;font-size:clamp(11px,.7vw,20px);font-weight:400;color:var(--muted);margin-top:6px}.toolbar{display:flex;gap:14px;align-items:flex-end;flex-wrap:wrap}.toolbar label{display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:700;color:var(--muted)}.toolbar .search{flex:1;min-width:220px}input[type=search],select{height:42px;padding:10px 12px;border:1px solid var(--border);border-radius:6px;background:var(--panel);color:var(--ink);font-weight:400;min-width:160px}.view-switch{display:flex}.view-switch button{border-radius:0}.view-switch button:first-child{border-radius:7px 0 0 7px}.view-switch button:last-child{border-radius:0 7px 7px 0}button[aria-pressed=true]{background:var(--active);color:white}.statusline{display:flex;align-items:center;gap:20px;justify-content:space-between;font-size:13px;color:var(--muted)}.legend{display:flex;gap:18px}.legend span:nth-child(1){color:var(--g)}.legend span:nth-child(2){color:var(--c)}.legend span:nth-child(3){color:var(--h)}.zoom{display:flex;align-items:center;gap:8px}.zoom input{width:100px;accent-color:var(--c)}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:20px;align-items:start}.map-frame{overflow:auto;border:1px solid var(--border);border-radius:8px;background:var(--bg);max-height:calc(100vh - 355px);min-height:350px}#map{width:100%;min-width:960px}#map svg{display:block;width:100%;height:auto}.identity{cursor:pointer;transition:opacity .15s}.identity:hover,.identity:focus{filter:drop-shadow(0 0 2px #ac6bf1);outline:none}.identity:focus text,.identity.selected text{text-decoration:underline;text-decoration-thickness:1.5px}.identity.dimmed{opacity:.17}.identity.root-target:focus rect,.identity.root-target:hover rect{stroke:#fff;stroke-width:5}.inspector{position:sticky;top:18px;border:1px solid var(--border);background:var(--panel);border-radius:8px;padding:24px;max-height:calc(100vh - 355px);overflow:auto;font-size:14px}.close{display:none;position:absolute;right:10px;top:10px;padding:3px 10px;font-size:23px}h2{font-size:25px;line-height:1.2;margin:14px 0 18px}.detail-note{padding:14px 0;border-top:1px solid var(--border);margin-top:18px}.detail-note p{margin-bottom:0}.fine{font-size:12px;color:var(--muted)}.id{font-family:monospace;font-size:12px;overflow-wrap:anywhere;background:var(--wash);padding:10px;line-height:1.5}dl{margin:20px 0}dt{font-size:11px;font-weight:700;text-transform:uppercase;color:var(--muted);margin-top:17px;letter-spacing:.6px}dd{margin:5px 0;line-height:1.5}.relation{display:block;width:100%;text-align:left;font-size:13px;margin:5px 0;padding:8px 10px}.art{width:100%;height:190px;object-fit:contain;background:var(--bg);margin-top:12px}.list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.list[hidden],.map-frame[hidden]{display:none}.record{padding:16px;text-align:left;min-width:0;border-left:4px solid var(--c);border-radius:7px;background:var(--panel)}.record.gatherings{border-left-color:var(--g)}.record.humans{border-left-color:var(--h)}.record strong{display:block;margin:8px 0;line-height:1.4}.record small{color:var(--muted);overflow-wrap:anywhere;display:block;line-height:1.5}.record .ref{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1px}.list .empty{grid-column:1/-1;padding:30px}footer{font-size:12px;color:var(--muted);display:grid;grid-template-columns:1fr 1fr;gap:25px;margin-top:18px}footer p{margin:0}summary{cursor:pointer;font-weight:700}footer li{margin:8px 0}@media(min-width:2500px){.top{padding-top:50px}.toolbar label{font-size:20px}input[type=search],select{height:62px;font-size:23px}.toolbar button,.button{font-size:23px;padding:17px 24px}.toolbar{gap:24px}.statusline{font-size:22px;margin:12px 0}.snapshot{font-size:23px}.eyebrow{font-size:20px}.metrics{gap:26px;margin-bottom:34px}.metrics button{padding:30px}.workspace{grid-template-columns:minmax(0,1fr) 560px;gap:32px}.inspector{padding:36px;font-size:23px;max-height:calc(100vh - 590px)}.inspector h2{font-size:40px}.id,.fine{font-size:20px}dt{font-size:18px}.relation{font-size:22px;padding:14px}.map-frame{max-height:calc(100vh - 590px)}footer{font-size:19px}.record{font-size:23px}.record .ref{font-size:18px}.list{gap:20px}.art{height:300px}}@media(max-width:1250px){.workspace{grid-template-columns:minmax(0,1fr) 280px}.top{align-items:flex-start}.head-actions{gap:15px;flex-direction:column;align-items:flex-end}.metrics{gap:8px}.metrics button{padding:12px;gap:10px}.metrics small{font-size:10px}.list{grid-template-columns:repeat(2,minmax(0,1fr))}.legend{display:none}}@media(max-width:800px){.top{padding:22px 18px;display:block}.head-actions{margin-top:20px;flex-direction:row;justify-content:space-between;align-items:center}.top h1{font-size:31px}.top p{font-size:14px}main{padding:0 18px 24px}.metrics{grid-template-columns:repeat(2,1fr)}.metrics button:last-child{grid-column:1/-1}.metrics small{font-size:11px}.metrics b{font-size:30px}.toolbar{gap:12px}.toolbar label{flex:1;min-width:135px}.toolbar input,.toolbar select{min-width:0;width:100%;font-size:14px}.toolbar .search{flex-basis:100%}.workspace{display:block}.map-frame{min-height:300px;max-height:70vh}.inspector{display:none}.inspector.open{display:block;position:fixed;inset:24px 14px;max-height:none;z-index:20;box-shadow:0 0 0 30px #211b2b88;overflow:auto}.close{display:block}.statusline{gap:10px;flex-wrap:wrap}.list{grid-template-columns:1fr}.zoom{display:none}footer{grid-template-columns:1fr;font-size:12px}.snapshot{font-size:12px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* Screen-only palette: the shared SVG and exported PDF keep their print colors. */
:root:not([data-theme=light]) #map [fill="#FBF9FC"]{fill:var(--bg)}
:root:not([data-theme=light]) #map [fill="#211B2B"]{fill:var(--ink)}
:root:not([data-theme=light]) #map [fill="#686372"]{fill:var(--muted)}
:root:not([data-theme=light]) #map [fill="#F8E9EF"]{fill:#382333}
:root:not([data-theme=light]) #map [fill="#F0EBF8"]{fill:#2d2440}
:root:not([data-theme=light]) #map [fill="#E4F3EF"]{fill:#17362f}
:root:not([data-theme=light]) #map text[fill="#B33565"]{fill:var(--g)}
:root:not([data-theme=light]) #map text[fill="#6346A6"]{fill:var(--c)}
:root:not([data-theme=light]) #map text[fill="#087866"]{fill:var(--h)}
:root:not([data-theme=light]) #map line[stroke="#DDD8E2"]{stroke:var(--border)}
:root:not([data-theme=light]) #map line[stroke="#B33565"]{stroke:var(--g)}
:root:not([data-theme=light]) #map line[stroke="#6346A6"]{stroke:var(--c)}
:root:not([data-theme=light]) #map line[stroke="#087866"]{stroke:var(--h)}
#themeToggle{white-space:nowrap;font-size:14px}@media(min-width:2500px){#themeToggle{font-size:23px;padding:17px 24px}}@media(max-width:800px){.head-actions{flex-wrap:wrap;gap:12px}#themeToggle{font-size:12px}}

/* Interaction accents only; artwork and catalog legend colors stay unchanged. */
:root{--interaction-gold:#d6b66b}:root[data-theme=light]{--interaction-gold:#997313}.identity:hover,.identity:focus{filter:drop-shadow(0 0 2px var(--interaction-gold))}.identity.selected rect,.identity:focus rect{stroke:var(--interaction-gold)}button:hover,.button:hover,button:focus-visible,.record[aria-pressed=true]{border-color:var(--interaction-gold)}

/* Gold is reserved for interaction outlines; artwork and catalog legend colors are unchanged. */
:root,:root[data-theme=light]{--interaction:var(--interaction-gold);--focus:var(--interaction-gold)}
.identity:hover,.identity:focus{filter:none;outline:none}.identity:focus text,.identity.selected text{text-decoration:none}
.identity .interaction-outline{fill:none;stroke:transparent;stroke-width:2.5;pointer-events:none;vector-effect:non-scaling-stroke}
.identity:hover .interaction-outline,.identity:focus-visible .interaction-outline,.identity.selected .interaction-outline{stroke:var(--interaction)}
.identity.root-target:focus rect,.identity.root-target:hover rect{stroke:var(--interaction);stroke-width:2.5}
@media(hover:hover){button:hover,.button:hover{outline:2px solid var(--interaction);outline-offset:2px}}
.record.selected{outline:2px solid var(--interaction);outline-offset:2px}

.identity.selected > rect:not(.interaction-outline),.identity:focus > rect:not(.interaction-outline){stroke:none}
