.collection-brand { display: grid; justify-items: start; gap: .12em; }
.collection-brand a { color: inherit; text-decoration: none; }
.collection-switch { display: inline-flex; align-items: center; position: relative; color: var(--rose-accent, #f0acd9); }
.collection-switch::after { content: ''; position: absolute; right: .6em; width: .35em; height: .35em; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-.1em) rotate(45deg); pointer-events: none; }
#collection-choice { appearance: none; box-sizing: border-box; min-height: 31px; width: auto; max-width: 100%; margin: 0; padding: .16em 1.6em .16em .38em;
  background: var(--bg, #242436); border: 1px solid currentColor; border-radius: 4px; color: inherit; color-scheme: dark;
  font: 700 .83em/1.2 Arial, sans-serif; letter-spacing: .045em; text-transform: uppercase; cursor: pointer; }
#collection-choice:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.research-brand { display: flex; align-items: center; flex-wrap: wrap; gap: .6em; }
.research-brand #collection-choice { font-size: .83rem; }
@media(max-width:700px){
  .hud .brand { flex-direction: row; align-items: center; }
  .hud .collection-switch { min-height: 32px; }
  .hud #collection-choice { font-size: 11px; }
}
@media(max-width:400px){ .hud .brand {gap: 4px;} .hud .brand-symbol {font-size: 24px !important;} }

:root[data-collection="men"] {
  --person-fill:#f1bed3; --person-selected-fill:#ff2ca8;
  --person-stroke:none; --person-selected-stroke:none; --person-hover-stroke:none; --person-selected-shadow:none;
}
:root[data-collection="trans"] {
  --base:#192837; --bg:#182735; --panel:#253a49; --raised:#304a5b;
  --ink:#edf7fa; --paper-text:#e7f2f7; --subtext:#c1d5de; --rose-accent:#a1deed;
  --petal:#afe2ef; --neon:#54dfff; --quiet-line:#506b7b; --control-edge:#789cae; --plum:#142f3a; --land:#344b57;
  --person-fill:#54dfff; --person-stroke:#164555; --person-selected-stroke:#f0fdff;
}
:root[data-collection="lesbian"] {
  --base:#2a2329; --bg:#29232a; --panel:#3d3138; --raised:#51414a;
  --ink:#fff2e8; --paper-text:#f5e9df; --subtext:#e0cabe; --rose-accent:#f7bb91;
  --petal:#f6c5a0; --neon:#ff9d54; --quiet-line:#78615e; --control-edge:#b39284; --plum:#39261f; --land:#514547;
  --person-fill:#000; --person-stroke:none; --person-selected-stroke:none;
  --person-hover-stroke:none; --person-selected-shadow:none;
}
:root:is([data-collection="trans"],[data-collection="lesbian"]) {
  --rose-glass: var(--panel); --pink:var(--rose-accent); --muted:var(--subtext); --focus:var(--petal); --line:var(--quiet-line);
}
html[data-collection] .brand-symbol { display:inline-flex; align-items:center; text-shadow:none; }
html[data-collection] .brand-symbol svg { width:.98em; height:.98em; fill:var(--person-selected-fill,var(--person-fill)); stroke:var(--person-stroke); stroke-width:1; }
html[data-collection="trans"] .brand-symbol svg { stroke:var(--person-fill); }
html:not([data-collection="men"]) :is(.atlas,.relationship-stage) { background:radial-gradient(ellipse at 60% 40%,var(--raised),var(--bg) 85%); }
html:not([data-collection="men"]) .default-geography .land { fill: var(--land);stroke:var(--control-edge); }
html:not([data-collection="men"]) .default-geography .country-label { fill:var(--subtext); }
html:not([data-collection="men"]) .atlas-shade { background:linear-gradient(0deg,var(--bg),transparent 28%,transparent 74%,var(--bg)); }
html:not([data-collection="men"]) :is(.mode-switch,.map-tools,.map-legend,.shared-place,.map-field select,.connection-tabs,.connection-card,.shared-explorer,.connection-empty,.drawer,.refine details,#patterns,.searchbox,.bucket,.chip,.apply-atlas,.fields select,.fields input) { border-color:var(--control-edge); background-color:var(--panel); }
html:not([data-collection="men"]) :is(.mode-switch .active,.life-panel .evidence-button,.deck-go,.connection-follow,.connection-tabs button[aria-pressed="true"],#to-results) { background:var(--petal); color:var(--plum); }
html:not([data-collection="men"]) :is(.life-panel,.bottom-hud) { background:var(--panel); border-color:var(--control-edge); }
html:not([data-collection="men"]) .life-panel { border-top-color:var(--rose-accent);box-shadow:4px 5px 0 -1px var(--bg),8px 10px 0 -2px var(--quiet-line),0 17px 50px #0d101559; }
html:not([data-collection="men"]) :is(.deck-controls,.timeline-heading,.deck-button,.timeline-actions button,.drawer .site-history,.connection-empty,.research-tools #atlas-search,.research-tools #edit-filters) { background:var(--bg); border-color:var(--quiet-line); }
html:not([data-collection="men"]) :is(.life-panel .text-link,.date,.precision-flag,.tie-kind,.connection-source,.shared-place .more-lives,.bottom-hud #creator-note,.bottom-hud .photo-research-link,.map-rail .map-loading,.map-rail .shared-place p) {color:var(--rose-accent);}
html:not([data-collection="men"]) .bottom-hud .time-event.selected {background:var(--petal);color:var(--plum);}
html:not([data-collection="men"]) .bottom-hud .time-event.selected small {color:var(--plum);}
html:not([data-collection="men"]) .bottom-hud .time-event.selected i {background:var(--neon);border-color:var(--plum);box-shadow:0 0 0 3px var(--control-edge);}
html:not([data-collection="men"]) :is(.deck-position input,#atlas-q,.connection-heading h2,.connection-card h4,.apply-atlas,.bucket) {color:var(--paper-text);}
html[data-collection] .map-legend .man-key { display:inline-flex; width:15px; height:15px; clip-path:none; background:transparent; box-shadow:none; }
html[data-collection] .man-key svg { width:100%; height:100%; fill:var(--person-fill); stroke:var(--person-stroke); stroke-width:1.6; }
html[data-collection] .map-legend .man-key.neon { width:18px; height:18px; }
html[data-collection] .man-key.neon svg { fill:var(--person-selected-fill,var(--person-fill)); stroke:var(--person-selected-stroke); stroke-width:2; }
html[data-collection] #experience .man-mark .person-symbol { fill:var(--person-fill); stroke:var(--person-stroke); stroke-width:1; stroke-linejoin:round; filter:none; }
html[data-collection] #experience .man-mark.chosen-man .person-symbol { fill:var(--person-selected-fill,var(--person-fill)); stroke:var(--person-selected-stroke); stroke-width:1.7; filter:var(--person-selected-shadow,drop-shadow(0 0 1.6px #111c22)); }
html[data-collection] #experience .man-mark:is(:hover,:focus-visible) .person-symbol { stroke:var(--person-hover-stroke,#fff); stroke-width:2; }
html:not([data-collection="men"]) .moment-halo {fill:var(--bg);fill-opacity:.4;stroke:var(--neon);filter:none;}
html:not([data-collection="men"]) .moment-halo-edge {stroke:var(--petal);}
html:not([data-collection="men"]) .route.past {stroke:var(--rose-accent);}
html:not([data-collection="men"]) .bucket {background:linear-gradient(to right,var(--raised) var(--share),var(--panel) var(--share));}

html:not([data-collection="men"]) .moment-label-bg { fill:var(--bg);stroke:var(--control-edge); }
html:not([data-collection="men"]) #current-moment-label .sat-current { fill:var(--paper-text); }
html:not([data-collection="men"]) #current-moment-label .sat-leader { stroke:var(--rose-accent); }
html:not([data-collection="men"]) #experience:not([data-background="places"]) .route { stroke:var(--petal); }
html:not([data-collection="men"]) :is(#atlas-search button,.research-tools a,.badge-guide-link) { color:var(--petal); }

.personal-tools { width:100%; display:grid; gap:2px; justify-items:stretch; padding:4px;
  pointer-events:auto; border:1px solid var(--control-edge,#ad91a1); border-radius:5px; background:var(--panel,#342e40); color:var(--paper-text,#f1e8ef); }
.personal-tools[hidden], .personal-tools [hidden] {display:none;}
#show-personal-links { display:flex; align-items:center; justify-content:space-between; gap:5px; text-align:left; min-height:34px; padding:4px 7px; font-size:13px; font-weight:650; line-height:1.2; }
#show-personal-links b { border:1px solid currentColor; border-radius:20px; padding:3px 7px; font-size:11px; }
#show-personal-links[aria-checked="true"] b {background:var(--petal,#ffd3e7);color:var(--plum,#362434);}
#list-personal-links,.personal-tools small {padding:0 7px 4px; text-align:left; font-size:12px; color:var(--petal,#ffd3e7);}
#list-personal-links {text-decoration:underline; text-underline-offset:2px;}
.map-tie-row {display:flex; justify-content:space-between; align-items:baseline; gap:1em; width:100%; padding:12px 0; border-bottom:1px solid var(--control-edge,#92758a); text-align:left;}
.map-tie-row small {color:var(--petal,#ffd3e7);}
#map { --tie-color:#ffc5df; }
html[data-collection="trans"] #map { --tie-color:#a1e8f8; }
html[data-collection="lesbian"] #map { --tie-color:#f4c6a7; }
.tie-route, .tie-leader, .personal-line { cursor:pointer; }
:is(.tie-route,.tie-leader) path { fill:none; vector-effect:non-scaling-stroke; stroke-linecap:round; }
.tie-hit { stroke:transparent; stroke-width:12; pointer-events:stroke; }
.tie-underlay { stroke:#241b2b; stroke-width:4.5; pointer-events:none; }
.tie-ink { stroke:var(--tie-color); stroke-width:2; pointer-events:none; }
.record-line .tie-ink { stroke:#e6deeb; stroke-dasharray:1 5; }
.record-line .tie-underlay { stroke-dasharray:1 5; }
.tie-label-box { fill:#2b2332; stroke:var(--tie-color); stroke-width:1; }
.tie-contact-name { fill:#fff0f7; font:600 13px Arial,sans-serif; }
.record-line .tie-label-box { stroke:#d5cada; }
.tie-contact-end, .tie-hub { fill:#302137; stroke:var(--tie-color); stroke-width:2; }
.tie-hub { stroke:#e6deeb; }
:is(.tie-active,.is-framed) .tie-ink { stroke:white; stroke-width:3; }
.tie-active .tie-label-box { fill:#50394f; stroke:white; stroke-width:2; }
.tie-end-hit { fill:transparent; pointer-events:all; }
@media (pointer:coarse) { .tie-end-hit { r:12px; } }
.personal-line:not(.tie-active) :is(.tie-label-box,.tie-contact-name) { visibility:hidden; pointer-events:none; }
.connection-focus .other-people .man-mark:not(:hover,:focus-visible) { opacity:.32; }
.connection-focus .site-pin:not(:hover,:focus-visible) .site-symbol { opacity:.65; }
#map-layer .route { stroke-width:1.8; stroke-opacity:.8; stroke-linecap:round; pointer-events:none; }
#map-layer .route.past { stroke-opacity:1; }
#experience[data-background="places"] #map-layer .route { opacity:1; }
.connection-focus :is(.man-mark,.site-pin) > :is(.man-hit,.person-symbol,.moment-halo,.moment-halo-edge,.hit-area,.site-symbol) {
  transform:scale(var(--connection-marker-scale,1)); transform-origin:0 0;
}
.josef-opening #connection-overlay { display:none; }
#web-options {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px 7px;padding:1px 7px 3px;font:12px/1.3 Arial,sans-serif;}
#web-options[hidden] {display:none;}
#web-options label {display:inline-flex;align-items:center;gap:3px;}
#web-options input {accent-color:var(--petal,#ffd3e7);}
#fit-web {padding:3px;color:var(--petal,#ffd3e7);text-decoration:underline;}

/* A map with no life selected keeps the space available for every person’s marker. */
#show-all-men:not([hidden]) {
  display:inline-flex;align-items:center;justify-content:center;
  background:#392b3b;border:1px solid #b8799b;color:#ffcee5;border-radius:6px;
  font:inherit;font-weight:600;padding:6px 11px;cursor:pointer;white-space:nowrap;
}
#show-all-men[aria-pressed="true"] {background:#ffc0dd;color:#342035}
#experience.all-men :is(.life-panel,.timeline-heading,#timeline,.rail-place,#personal-tools,#fit-life,#current-moment-label,.interaction-hint,.orientation,.atlas-shade) {display:none!important}
html[data-collection="men"] #experience.all-men .man-mark .person-symbol {
  fill:#ff86c9;stroke:#552441;stroke-width:.55;fill-opacity:1;filter:none;
}
html[data-collection="men"] #experience.all-men .man-mark:is(:hover,:focus-visible) .person-symbol {fill:#ffe4f3;stroke:#fff;stroke-width:1.5}
#experience.all-men .site-symbol {opacity:.46}
#experience.all-men .site-pin:is(:hover,:focus-visible) .site-symbol {opacity:1}
#experience.all-men .map-rail {align-self:start}
@media(max-width:700px) {#show-all-men {min-height:44px} }

#experience.all-men .map-legend span:has(> .legend-selected) {display:none}
html[data-collection="men"] #experience.all-men .man-key:not(.neon) svg {fill:#ff86c9;stroke:#552441}
@media(max-width:700px){
  #experience.all-men:not(.no-matches) {display:flex;flex-direction:column;overflow:visible}
  #experience.all-men .hud {order:0}
  #experience.all-men .map-rail {order:1;min-height:0;width:auto;max-width:100%;margin:0 18px 6px;align-self:stretch;display:flex;flex-flow:row wrap;align-items:start}
  #experience.all-men .map-rail .map-tools {width:auto;min-width:135px}
  #experience.all-men .map-rail .map-legend {flex:1;min-width:124px}
  #experience.all-men #atlas {order:2;position:relative;inset:auto;width:100%;height:clamp(360px,65svh,700px);flex:none}
  #experience.all-men:not(.no-matches) .bottom-hud {order:3}
  #experience.all-men .research-tools {flex-wrap:wrap}
  #experience.all-men .research-tools #atlas-search {flex:1 1 148px;min-width:120px}
}

html[data-collection="men"] #experience.all-men .man-mark .person-symbol {
  fill:#ff8cd4;stroke:#32192c;stroke-width:.36;vector-effect:none;
}
html[data-collection="men"] #experience.all-men .man-mark:is(:hover,:focus-visible) .person-symbol {fill:#ffe4f3;stroke:#fff;stroke-width:1.5}
