.staff-tool-icon.staff-map-icon { background: #e3ebf4; color: #245c88; }
.staff-map-layout { display: grid; grid-template-columns: minmax(230px, .65fr) minmax(0, 1.85fr); align-items: start; gap: 1rem; }
.staff-map-controls, .staff-map-card { min-width: 0; background: var(--paper, white); border: 1px solid var(--line); border-radius: 1rem; padding: 1rem; }
.staff-map-controls { display: grid; gap: .9rem; }
.staff-map-search { display: grid; gap: .4rem; font-weight: 650; }
.staff-map-search input { width: 100%; padding: .55rem; border-radius: .5rem; border: 1px solid var(--line); font: inherit; }
.staff-map-controls fieldset { margin: 0; min-width: 0; border: 1px solid var(--line); border-radius: .65rem; padding: .65rem; }
.staff-map-controls legend { padding: 0 .3rem; font-weight: 700; }
.staff-map-controls fieldset label { display: flex; align-items: center; gap: .45rem; padding: .35rem 0; }
.staff-map-controls input[type="checkbox"] { accent-color: var(--green); flex: none; }
.staff-map-controls [data-map-count] { margin-left: auto; color: var(--muted); }
.staff-map-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.staff-map-missing summary { cursor: pointer; font-weight: 650; }
.staff-map-missing ul { max-height: 13rem; overflow: auto; padding-inline-start: 1.2rem; margin: .6rem 0 0; }
.staff-map-missing li { padding-block: .15rem; }
#staffMapCanvas { height: clamp(22rem, 65vh, 47rem); border-radius: .7rem; background: #e7eee9; isolation: isolate; }
#staffMapStatus { margin: .65rem 0 0; }
.staff-map-note { color: var(--muted); margin: .3rem 0 0; font-size: .9rem; }
.staff-map-home { background: #176747; }
.staff-map-placement { background: #235e98; }
.staff-map-church { background: #ad4a32; }
.staff-map-dot { height: .7rem; width: .7rem; border-radius: 50%; flex: none; }
#staffMapCanvas .staff-map-marker { box-sizing: border-box; display: grid; place-items: center; text-align: center; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 1px 4px #0006; color: white; font-size: 10px; line-height: 1; font-weight: 700; }
.staff-map-marker:focus-visible { outline: 2px solid #213830; outline-offset: 2px; }
.staff-map-records { max-width: min(19rem, 58vw); max-height: 16rem; overflow: auto; white-space: normal; }
.staff-map-records strong, .staff-map-records small { display: block; }
.staff-map-records .text-button { font-size: inherit; text-align: left; white-space: normal; padding: .25rem 0; }
@media (max-width: 800px) { .staff-map-layout { grid-template-columns: 1fr; } }

#staffMapCanvas .staff-map-tooltip { width: max-content; max-width: min(22rem, 68vw); box-sizing: border-box; white-space: normal; }
.staff-map-tooltip .staff-map-records { max-width: none; overflow-wrap: anywhere; }
