.bsm {
	--map-surface: #fffdf7;
	--map-border: #c9cec1;
	--map-accent: #984827;
	--map-height: clamp(465px, 65vh, 720px);
	padding-block: clamp(32px, 5vw, 72px) 3rem;
}
.bsm [hidden] { display: none !important; }
.bsm-heading {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
	align-items: end;
	gap: 2rem;
	margin-bottom: clamp(20px, 3vw, 36px);
}
.bsm-heading h1 {
	margin: 0;
	font: normal clamp(42px, 5.8vw, 78px)/1.04 var(--serif);
	letter-spacing: -.055em;
	color: var(--green);
	overflow-wrap: anywhere;
}
.bsm-intro { max-width: 46ch; color: var(--muted); line-height: 1.5; }
.bsm-intro > :first-child { margin-top: 0; }
.bsm-intro > :last-child { margin-bottom: 0; }
.bsm-filters {
	display: flex;
	align-items: end;
	flex-wrap: wrap;
	gap: 12px 18px;
	padding: 14px 18px;
	background: var(--sage);
	border: 1px solid var(--map-border);
	border-radius: 5px 5px 0 0;
}
.bsm-filters label {
	display: grid;
	gap: 3px;
	flex: 1 1 150px;
	min-width: 0;
	margin: 0;
	font: 600 12px/1.4 var(--sans);
	color: var(--green);
}
.bsm-filters select {
	box-sizing: border-box;
	width: 100%;
	min-height: 40px;
	padding: 6px 8px;
	color: var(--ink);
	background-color: var(--map-surface);
	border: 1px solid #a4b09f;
	border-radius: 3px;
	font: 400 15px/1.35 var(--sans);
	text-overflow: ellipsis;
}
.bsm-reset, .bsm-fit {
	color: var(--green);
	font: 600 13px/1.35 var(--sans);
	cursor: pointer;
}
.bsm-reset {
	min-height: 40px;
	padding: 5px 4px;
	border: 0;
	background: transparent;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.bsm-reset:disabled { color: #5a685c; text-decoration: none; cursor: default; }
.bsm-explorer {
	display: grid;
	border: 1px solid var(--map-border);
	border-radius: 4px;
	background: var(--map-surface);
	overflow: hidden;
}
.bsm-filters:not([hidden]) + .bsm-explorer { border-top: none; border-radius: 0 0 5px 5px; }
.bsm-explorer.has-map { grid-template: "list map" var(--map-height) / minmax(260px, 31%) minmax(0, 1fr); }
.bsm-map { position: relative; min-height: 0; min-width: 0; isolation: isolate; }
.has-map .bsm-map { grid-area: map; border-inline-start: 1px solid var(--map-border); }
.bsm-canvas {
	height: 100%;
	width: 100%;
	z-index: 0;
	background: #e0e5da;
	font-family: var(--sans);
}
.bsm-map .leaflet-control-attribution { font: 11px/1.4 var(--sans); }
.bsm-map .leaflet-control-attribution a { color: #245045; }
.bsm-map .leaflet-bar {
	overflow: hidden;
	border: 1px solid var(--map-border);
	border-radius: 4px;
	box-shadow: 0 2px 8px #23342a1a;
}
.bsm-map .leaflet-bar a {
	width: 38px;
	height: 38px;
	line-height: 38px;
	color: var(--green);
	background-color: var(--map-surface);
}
.bsm-fit {
	position: absolute;
	top: 10px;
	left: 10px;
	max-width: calc(100% - 72px);
	min-height: 38px;
	padding: 5px 12px;
	border: 1px solid var(--map-border);
	border-radius: 4px;
	background: var(--map-surface);
	box-shadow: 0 2px 8px #23342a1a;
}
.bsm-map-status {
	position: absolute;
	bottom: 26px;
	left: 10px;
	right: 10px;
	width: fit-content;
	max-width: calc(100% - 20px);
	margin: 0;
	padding: 5px 9px;
	border-radius: 3px;
	background: var(--map-surface);
	color: var(--ink);
	font: 13px/1.4 var(--sans);
	pointer-events: none;
}
.bsm-map.is-unavailable { padding: .75rem 1.1rem; background: var(--paper); }
.bsm-map.is-unavailable .bsm-canvas { display: none; }
.bsm-map.is-unavailable .bsm-map-status { position: static; padding: 0; max-width: none; background: transparent; }
.bsm-results { min-width: 0; }
.has-map .bsm-results { grid-area: list; display: flex; min-height: 0; flex-direction: column; }
.bsm-results-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 18px;
	border-bottom: 1px solid var(--line);
}
.bsm-results h2 { margin: 0; font: 400 25px/1.15 var(--serif); letter-spacing: -.035em; }
.bsm-count {
	flex: none;
	min-width: 29px;
	padding: 3px 8px;
	border-radius: 14px;
	background: var(--sage);
	color: var(--green);
	font: 600 13px/1.4 var(--sans);
	text-align: center;
}
.bsm-list { padding: 0; margin: 0; list-style: none; }
.has-map .bsm-list { overflow-y: auto; scrollbar-width: thin; scrollbar-color: #a8b5a5 transparent; }
.bsm-list > li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 13px 15px;
	border-inline-start: 3px solid transparent;
}
.bsm-list > li + li { border-top: 1px solid var(--line); }
.bsm-list > .is-selected { background: #eff1e8; border-inline-start-color: var(--map-accent); }
.bsm-story-copy { min-width: 0; overflow-wrap: anywhere; }
.bsm-story-meta { margin: 0 0 3px; color: var(--muted); font: 500 12px/1.4 var(--sans); }
.bsm-story-link {
	display: block;
	color: var(--green);
	text-decoration: none;
	font: 400 21px/1.15 var(--serif);
	letter-spacing: -.025em;
}
.bsm-story-link:hover, .bsm-story-link:focus-visible { color: var(--map-accent); text-decoration: underline; text-underline-offset: 3px; }
.bsm-place {
	display: inline-flex;
	align-items: baseline;
	gap: 5px;
	margin: 4px 0 0;
	padding: 3px 0;
	border: 0;
	background: transparent;
	color: #516755;
	font: 400 13px/1.4 var(--sans);
	text-align: start;
	cursor: pointer;
}
.bsm-place svg { align-self: flex-start; margin-top: 2px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; }
.bsm-place:hover:not(:disabled) span { text-decoration: underline; }
.bsm-place:disabled { cursor: default; }
.bsm-thumbnail { width: 58px; height: 58px; border-radius: 3px; object-fit: cover; flex: none; }
.bsm-empty { margin: 0; padding: 20px; color: var(--muted); }
.bsm-pin { background: transparent; border: 0; }
.bsm-pin > span {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	margin: 2px 0 0 3px;
	border: 2px solid #fffdf7;
	border-radius: 50% 50% 50% 0;
	background: var(--green);
	color: white;
	transform: rotate(-45deg);
	box-shadow: 0 2px 5px #152b2180;
}
.bsm-pin b { transform: rotate(45deg); font: 700 13px/1 var(--sans); }
.bsm-pin b:empty { width: 8px; height: 8px; border-radius: 50%; background: #fffdf7; }
.bsm-pin.is-selected > span { background: var(--map-accent); }
.bsm :is(button, select, a):focus-visible, .bsm .bsm-pin:focus-visible { outline: 3px solid var(--map-accent); outline-offset: 2px; }
.bsm .leaflet-popup-content-wrapper, .bsm .leaflet-popup-tip { background: var(--map-surface); }
.bsm .leaflet-popup-content-wrapper { border-radius: 5px; }
.bsm .leaflet-popup-content { margin: 15px 26px 16px 16px; }
.bsm .leaflet-container a.leaflet-popup-close-button { width: 26px; height: 26px; color: var(--green); }
.bsm-popup strong { display: block; color: var(--green); font: 400 23px/1.15 var(--serif); }
.bsm-popup p { margin: 6px 0 0; font: 400 12px/1.4 var(--sans); color: var(--muted); }
.bsm-popup ul { list-style: none; margin: 8px 0 0; padding: 0; }
.bsm-popup li + li { margin-top: 5px; }
.bsm .bsm-popup a { display: inline-block; color: var(--map-accent); font: 600 14px/1.4 var(--sans); text-decoration: underline; text-underline-offset: 3px; }
.bsm-note { color: var(--muted); margin: .7rem 0 0; font: 400 12px/1.5 var(--sans); }
.bsm-note a { text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 760px) {
	.bsm { padding-block: 25px 2rem; }
	.bsm-heading { display: block; margin-bottom: 18px; }
	.bsm-intro { margin-top: 10px; font-size: 15px; }
	.bsm-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; padding: 12px; }
	.bsm-filters select { min-height: 42px; font-size: 16px; }
	.bsm-reset { justify-self: start; }
	.bsm-explorer.has-map { display: flex; flex-direction: column; }
	.has-map .bsm-map { height: clamp(300px, 52svh, 470px); border: 0; border-bottom: 1px solid var(--map-border); }
	.has-map .bsm-list { overflow: visible; }
	.bsm-list > li { padding-block: 12px; }
	.bsm-place { min-height: 30px; }
	.bsm-thumbnail { width: 62px; height: 62px; }
}
@media print {
	.bsm-map, .bsm-filters { display: none !important; }
	.bsm-explorer.has-map { display: block; border: 0; }
	.has-map .bsm-list { overflow: visible; }
}
