.places-page { padding-top: 30px; }
.places-page h2 { margin: 0; }
.places-intro { color: var(--muted); font-size: 14px; margin: 7px 0 20px; }
.residence-section { padding: 10px 0 24px; border-bottom: 1px solid var(--line); }
.residence-section h3 { font-size: 14px; margin: 0; }
#residence-earlier { font-size: 12px; color: var(--muted); margin: 6px 0 18px; }
#residence-chart svg { width: 100%; display: block; overflow: visible; }
.residence-label { fill: var(--ink); font-size: 11px; }
.residence-label[role="button"], .residence-period { cursor: pointer; }
.residence-period:focus-visible, .residence-label:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
.residence-tick { fill: var(--muted); font-size: 10px; }
.residence-grid { stroke: var(--line); stroke-dasharray: 2 5; }
.residence-hit { fill: transparent; }
.residence-bar { fill: #b68da9; }
.residence-bar.current { fill: var(--accent); }
.residence-bar.approximate { fill: none; stroke: #b68da9; stroke-width: 2; stroke-dasharray: 3 2; }
.residence-break { fill: var(--accent); font-size: 12px; }
.residence-footer { display: flex; justify-content: space-between; gap: 20px; font-size: 10px; color: var(--muted); }
.residence-footer p { margin: 0; }
@media (max-width: 500px) { .residence-footer { flex-wrap: wrap; gap: 5px; } }
.places-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 32px; align-items: start; }
.globe-panel { min-width: 0; }
#globe { width: 100%; display: block; cursor: grab; touch-action: none; }
#globe:active { cursor: grabbing; }
#globe:focus-visible, .places-page button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ocean { fill: url(#ocean-color); stroke: #237aab; stroke-width: 1.5; }
.land { fill: #65b873; stroke: #489668; stroke-width: .22; stroke-linejoin: round; }
.terrain-north { fill: #9cc783; }
.terrain-tropical { fill: #269b78; }
.terrain-sand { fill: #e9ba71; stroke: #c9a15f; }
.terrain-polar { fill: #f0f6f2; stroke: #cadfdf; }
.graticule { fill: none; stroke: #287b9f; stroke-width: .55; opacity: .17; }
.place-marker { cursor: pointer; }
.pin-hit { fill: transparent; stroke: none; }
.pin-body { fill: #db187f; stroke: #fffaf2; stroke-width: 2; paint-order: stroke fill; }
.pin-center { fill: white; stroke: none; }
.place-marker.conference .pin-body { fill: var(--bg); stroke: #817787; }
.place-marker.conference .pin-center { fill: #817787; }
.place-marker.selected .pin-body, .place-marker:focus-visible .pin-body { stroke: #302630; stroke-width: 3; }
.journey-route { fill: none; stroke: #bd146f; stroke-width: 1.8; opacity: .72; pointer-events: none; }
.journey-route.active { stroke-width: 3; opacity: 1; }
.journey-arrow { fill: #bd146f; opacity: .8; pointer-events: none; }
.journey-arrow.active { opacity: 1; }
.journey-controls { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.journey-controls label { font-size: 12px; }
.journey-controls select { flex: 1; min-width: 0; width: 0; font: inherit; font-size: 11px; padding: 8px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 3px; }
.journey-controls button { min-width: 32px; min-height: 34px; border: 1px solid var(--line); background: transparent; border-radius: 3px; color: var(--ink); cursor: pointer; }
.globe-controls { display: flex; gap: 7px; align-items: center; }
.globe-controls span { margin-right: auto; font-size: 11px; color: var(--muted); }
.globe-controls button { border: 1px solid var(--line); border-radius: 3px; background: transparent; color: var(--ink); cursor: pointer; min-height: 34px; min-width: 34px; padding: 3px 9px; font-size: 12px; }
#globe-status { min-height: 18px; font-size: 11px; color: var(--muted); }
.places-sidebar { padding-top: 20px; }
.places-sidebar h3 { font-size: 14px; margin: 0 0 12px; }
.place-choice { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 11px 0; cursor: pointer; color: var(--ink); font-size: 13px; }
.place-choice span { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.place-choice[aria-pressed="true"] { color: var(--accent); }
.conference-toggle { display: flex; align-items: center; gap: 7px; margin-top: 26px; font-size: 12px; cursor: pointer; }
.conference-toggle input { accent-color: var(--accent); }
.conference-note { font-size: 11px; line-height: 1.6; color: var(--muted); margin: 5px 0 10px; }
#place-detail { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 18px; font-size: 12px; }
#place-detail h3 { margin-bottom: 5px; }
#place-detail p { margin: 8px 0; }
#place-detail a { color: var(--accent); margin-right: 12px; }
@media (max-width: 800px) { .places-layout { grid-template-columns: minmax(0,1fr); gap: 5px; } .globe-panel { max-width: 590px; width: 100%; margin: auto; } .places-sidebar { padding-top: 0; } }

.journey-time { display: grid; grid-template-columns: 1fr auto; gap: 9px 16px; padding: 18px 0 6px; align-items: center; font-size: 12px; }
.journey-time label { font-weight: 600; }
.journey-time output { color: var(--muted); text-align: right; }
.journey-time input { width: 100%; margin: 0; accent-color: var(--accent); }
.journey-time button { font: inherit; color: var(--accent); background: transparent; border: 1px solid var(--line); border-radius: 4px; padding: 5px 9px; cursor: pointer; }
.residence-cursor { stroke: var(--accent); stroke-width: 1.5; pointer-events: none; }
.globe-controls { flex-wrap: wrap; }

.residence-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.residence-heading button { font: inherit; font-size: 11px; color: var(--accent); background: #f6edf3; border: 1px solid var(--line); border-radius: 5px; padding: 5px 10px; cursor: pointer; }
.residence-undated { fill: var(--muted); font-size: 10px; }
#residence-scale-note { text-align: right; }

.visits-title { margin-top: 25px !important; }
.place-marker.visit .pin-body { fill: #157f8c; }

/* Soft sea-glass palette and a place card anchored over the globe. */
.ocean { stroke: #7aabb7; }
.land { fill: #8ab999; stroke: #73a587; }
.terrain-north { fill: #b5cca5; }
.terrain-tropical { fill: #62a88d; }
.terrain-sand { fill: #e4c89a; stroke: #c8b087; }
.terrain-polar { fill: #f4f3e9; stroke: #d9e5df; }
.graticule { stroke: #527e93; opacity: .12; }
.place-marker.travel .pin-body { fill: #c78641; }
.country-label { font-weight: 600; cursor: pointer; }
.country-places { border-bottom: 1px solid var(--line); padding: 10px 0; }
.country-places > summary { font-size: 12px; font-weight: 600; }
.country-places > summary::before, .city-places > summary::before { content: '+ '; color: var(--accent); }
.country-places[open] > summary::before, .city-places[open] > summary::before { content: '− '; }
.city-places { margin: 10px 0 0 13px; }
.city-places > summary { font-size: 12px; }
.city-places .place-choice { font-size: 11px; padding: 8px 0; }
.globe-panel { position: relative; }
.map-info { display: none; position: absolute; top: 14px; left: 14px; width: min(275px, calc(100% - 28px)); padding: 15px 18px; background: #fffcf8f5; border: 1px solid #d7ded6; border-radius: 10px; box-shadow: 0 8px 25px #20394514; z-index: 1; }
.map-info:has(#place-detail:not([hidden])) { display: block; }
.map-info #place-detail { margin: 0; padding: 0; border: 0; }
.map-info #place-detail h3 { padding-right: 14px; }
#close-place { position: absolute; right: 7px; top: 5px; border: 0; background: none; color: var(--muted); font-size: 20px; cursor: pointer; }

.place-history { padding-left: 16px; margin: 8px 0; font-size: 11px; color: var(--muted); }
.map-info { max-height: 290px; overflow: auto; }
.residence-key { display: flex; gap: 14px; font-size: 10px; color: var(--muted); margin: 2px 0 10px; }
.residence-key span::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.key-home::before { background: var(--accent); width: 13px !important; height: 3px !important; }
.key-conference::before { background: #258696; }
.key-travel::before { background: #bb874f; }

/* Keep the first view quiet; secondary controls open when needed. */
.residence-section { padding-bottom: 16px; }
#residence-earlier { margin-bottom: 12px; font-size: 11px; }
#residence-detail:empty { display: none; }
.places-layout { gap: 26px; grid-template-columns: minmax(0, 1fr) 220px; }
.places-sidebar { padding-top: 14px; }
#route-options, .candidate-options { margin-top: 16px; font-size: 11px; color: var(--muted); }
#route-options > summary::after, .candidate-options > summary::after { content: ' +'; }
#route-options[open] > summary::after, .candidate-options[open] > summary::after { content: ' −'; }
.candidate-options .conference-toggle { margin-top: 12px; font-size: 11px; }
.residence-key { margin: 14px 0 0; }
#globe-status:empty { display: none; }
.globe-controls { gap: 5px; }
.globe-controls button { border-radius: 6px; font-size: 11px; }
@media (max-width: 800px) { .places-layout { grid-template-columns: 1fr; } .places-sidebar { margin-top: 20px; } }

/* The same disclosure treatment as publication-year groups on About. */
.country-places { padding: 0; }
.country-places > summary { display: flex; align-items: center; gap: 10px; padding: 12px 0; font: 500 13px/1.4 var(--sans, -apple-system, BlinkMacSystemFont, sans-serif); }
.country-places > summary::before, .city-places > summary::before { content: none; }
.country-places .count { font: 10px/1.5 -apple-system, BlinkMacSystemFont, sans-serif; color: var(--muted); background: #f3e7ef; padding: 2px 7px; border-radius: 20px; }
.country-places .plus { margin-left: auto; }
.city-places { margin: 0 0 0 14px; border-top: 1px solid var(--line); }
.city-places > summary { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.city-places .plus { font-size: 16px; }
.country-row-rule { stroke: var(--line); stroke-width: .7; }
.country-row-plus { fill: var(--muted); font: 17px sans-serif; cursor: pointer; }
.land { fill: #e4e5df; stroke: #bec8c1; stroke-width: .55; }
.ocean { stroke: #a5bdc9; }
.graticule { stroke: #96acb7; opacity: .17; stroke-width: .5; }
.visit-area { fill: #729d89; opacity: .8; pointer-events: none; }
.area-visited { fill: #cc7aa7; }
.area-visit { fill: #65a5a7; }
.area-travel { fill: #b99a67; }

.residence-bar.approximate { fill: #c293b0; stroke: none; opacity: .85; }

.residence-heading { justify-content: flex-end; margin: 4px 0 10px; }
.country-places[open] > summary::before, .city-places[open] > summary::before { content: none; }
#globe-status:not(.load-error) { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Vivid accents on a quiet neutral base. */
.ocean { stroke: #629db7; }
.land { fill: #e8e7df; stroke: #bfc9c3; }
.visit-area { opacity: .9; stroke-width: .65; stroke-linejoin: round; }
.area-visited { fill: #e53696; stroke: #b20c6f; }
.area-visit { fill: #10b6b1; stroke: #008c8b; }
.area-travel { fill: #ffb537; stroke: #d78a15; }
.pin-body { fill: #dc1988; }
.place-marker.visit .pin-body { fill: #039d9b; }
.place-marker.travel .pin-body { fill: #eea222; }
.boundary-zoom { color: var(--accent); background: #f6e5ef; border: 0; border-radius: 5px; padding: 6px 9px; font-size: 11px; margin-top: 7px; cursor: pointer; }

.trip-route { fill: none; stroke: #eb9821; stroke-width: 1.7; stroke-dasharray: 4 3; opacity: .85; pointer-events: none; }
.trip-arrow { fill: #d78309; pointer-events: none; }
.trip-route-toggle { display: flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 11px; color: var(--muted); }
.trip-route-toggle input { accent-color: var(--accent); }
.trip-route-toggle span { color: #929097; font-size: 10px; }

/* Local context is loaded only when the user zooms in. */
.neighbor-boundary { fill: none; stroke: #aeb5b6; stroke-width: .7; stroke-linejoin: round; pointer-events: none; }
.neighbor-labels text { fill: #788183; stroke: #fafaf8; stroke-width: 2.4; paint-order: stroke fill; text-anchor: middle; font: 9px -apple-system, BlinkMacSystemFont, sans-serif; pointer-events: none; }
.local-sea { fill: url(#ocean-color); pointer-events: none; }
.local-land { fill: #e8e7df; stroke: none; pointer-events: none; }

/* National borders stay visible in the globe overview. */
.country-boundaries { fill: none; stroke: #718489; stroke-width: .65; stroke-opacity: .85; stroke-linejoin: round; pointer-events: none; }

.places-heading { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.places-heading h2 { margin:0; }
.owner-lock { display:inline-flex; align-items:center; justify-content:center; padding:9px; border:0; border-radius:5px; color:var(--muted); background:transparent; font:inherit; font-size:12px; cursor:pointer; text-decoration:none; }
.owner-lock:hover { color:var(--accent); background:#f0eded; }
.owner-lock:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.unlock-panel { max-width:360px; margin:70px auto 120px; }
.unlock-panel h3 { font-size:21px; margin:0 0 24px; }
.unlock-panel label { display:block; font-size:12px; margin-bottom:8px; color:var(--muted); }
.unlock-row { display:flex; gap:8px; }
.unlock-row input { min-width:0; width:100%; padding:11px 12px; border:1px solid var(--line, #ddd); border-radius:5px; font:inherit; }
.unlock-row button { padding:10px 18px; background:var(--accent); color:white; border:0; border-radius:5px; font:inherit; font-size:13px; cursor:pointer; }
.unlock-row button:disabled { opacity:.6; cursor:wait; }
#unlock-message { min-height:22px; font-size:12px; color:var(--muted); margin:10px 0; }
.unlock-panel > a { font-size:12px; color:var(--muted); }
#owner-content[hidden], #unlock-panel[hidden], #lock-journey[hidden] { display:none; }

.journey-embedded > .header, .journey-embedded footer, .journey-embedded > .skip { display:none; }
.journey-embedded .places-page { padding-top:24px; }

.journey-embedded #lock-journey { visibility:hidden; }
#owner-heading:focus { outline:none; }

/* Visit details live in the selected-place card, not additional sidebar rows. */
.map-visits { list-style:none; margin:13px 0 0; padding:0; border-top:1px solid var(--line); }
.map-visit { display:grid; grid-template-columns:70px minmax(0,1fr); gap:11px; padding:11px 0; border-bottom:1px solid var(--line); }
.map-visit time { color:var(--muted); font-size:10px; line-height:1.6; font-variant-numeric:tabular-nums; padding-top:1px; }
.map-visit-copy { display:flex; flex-direction:column; gap:3px; min-width:0; }
.map-visit strong { color:var(--ink); font-size:12px; line-height:1.5; font-weight:600; }
.map-visit.conference strong { color:var(--accent); }
.map-visit .visit-context { color:var(--muted); font-size:10px; line-height:1.55; }
.map-info:has(.map-visits) { width:min(315px, calc(100% - 28px)); max-height:min(390px, 65dvh); }
