/**
 * Shared hub explorer shell — map-left / sidebar-right layout.
 * Settlements-style navy panel + legend-row layer toggles.
 *
 * Place colours (site-wide): Towns #2b6cb0 · Villages #2f855a
 * (same as explorer-map.js + duchy_hub_hard_layer_defs).
 *
 * @package The_Duchy
 */

:root {
	--duchy-place-town: #2b6cb0;
	--duchy-place-village: #2f855a;
}

/* ---------- Shell layout ---------- */

.ch-sd-hub-map-wrap.duchy-explorer-wrap.hub-explorer-map-wrap:not(.active) {
	display: none;
}

body.duchy-sd-inner #map-wrap-v.active.ch-sd-hub-map-wrap.duchy-explorer-wrap.hub-explorer-map-wrap,
.ch-sd-hub-map-wrap.duchy-explorer-wrap.hub-explorer-map-wrap.active {
	position: relative;
	display: flex !important;
	flex-direction: row;
	gap: 0;
	width: 100%;
	/* Fill viewport between sticky header/breadcrumb and the bottom filter dock
	   (was capped at 78vh / 720px — left a dead band above the dock). */
	height: var(--duchy-map-height, min(78vh, 720px));
	min-height: min(460px, var(--duchy-map-height, 460px));
	max-height: none;
	border: 3px solid #000;
	border-radius: 4px;
	box-shadow: 5px 5px 0 #000;
	overflow: hidden;
	background: #fff;
}

.hub-explorer-map-canvas {
	flex: 1 1 auto;
	position: relative;
	min-width: 0;
	background: #e2e8f0;
}

/*
 * .duchy-explorer-canvas uses height:100% + min-height:0. In this row-flex
 * wrap that percentage often fails to resolve, so Leaflet collapses to 0 and
 * MAP view is a blank white pane (grid works; map shell looks empty).
 */
.hub-explorer-map-wrap > .duchy-explorer-canvas.hub-explorer-map-canvas {
	align-self: stretch;
	height: auto;
	min-height: 100%;
}

.hub-explorer-map-leaflet {
	width: 100%;
	height: 100%;
	min-height: 460px;
	/* Trap Leaflet's internal z-indexes (panes 400-700, controls 1000) inside
	   the map so sibling overlays (search, LAYERS tile, mobile sheet) can
	   paint above with small z values. Same fix as the Scilly dock issue. */
	isolation: isolate;
}

.hub-explorer-sidebar {
	flex: 0 0 var(--duchy-explorer-sidebar-w, 320px);
	width: var(--duchy-explorer-sidebar-w, 320px);
	max-width: var(--duchy-explorer-sidebar-w, 320px);
	display: flex;
	flex-direction: column;
	border-left: 3px solid #000;
	background: #fff;
	overflow: hidden;
	min-height: 0;
}

/* ---------- Navy band (settlements look) ---------- */

.hub-explorer-sidebar__band {
	background: #1e2a5a;
	color: #fff;
	padding: 14px 16px 12px;
	flex: 0 0 auto;
}

.hub-explorer-sidebar__band-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.hub-explorer-sidebar__band-text {
	flex: 1 1 auto;
	min-width: 0;
}

.hub-explorer-sidebar__band-title {
	margin: 0;
	font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
	font-size: 1rem;
	font-weight: 800;
	letter-spacing: normal;
	text-transform: none;
	color: #fff;
	line-height: 1.2;
}

.hub-explorer-sidebar__band-sub {
	margin: 4px 0 0;
	font-size: 0.78rem;
	font-weight: 500;
	color: rgba( 255, 255, 255, 0.85 );
	line-height: 1.4;
}

/* Desktop: hide mobile-only collapse + peek type chips. */
.hub-explorer-sidebar__collapse,
.hub-explorer-peek-chips {
	display: none;
}

.hub-explorer-sidebar__body {
	flex: 1 1 auto;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 14px 16px 16px;
	min-height: 0;
}

/* ---------- Loading ---------- */

.hub-explorer-loading {
	padding: 8px 0 12px;
}

.hub-explorer-loading[hidden] {
	display: none !important;
}

.hub-explorer-loading__text {
	margin: 0;
	font-size: 0.85rem;
	font-weight: 600;
	color: #64748b;
}

/* ---------- Soft stats ---------- */

.hub-explorer-stats {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-bottom: 12px;
}

.hub-explorer-stat {
	border: 1px solid #dfe4ee;
	border-radius: 10px;
	background: #fff;
	padding: 8px 10px;
	text-align: left;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.hub-explorer-stat__n {
	font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
	font-size: 1.25rem;
	font-weight: 800;
	color: #1e2a5a;
	line-height: 1;
}

.hub-explorer-stat__l {
	font-size: 0.72rem;
	letter-spacing: normal;
	text-transform: none;
	color: #666;
	font-weight: 600;
}

.hub-explorer-group-label {
	font-size: 0.7rem;
	letter-spacing: 0.09em;
	word-spacing: 0.14em;
	text-transform: uppercase;
	color: #8a93a6;
	font-weight: 700;
	margin: 12px 0 6px;
}

/* ---------- Search ---------- */

.hub-explorer-search {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 10px;
	border: 2px solid #0f172a;
	border-radius: 999px;
	background: #fff;
	margin-bottom: 8px;
}

.hub-explorer-search__ic {
	font-size: 13px;
	opacity: 0.7;
}

.hub-explorer-search__input {
	flex: 1 1 auto;
	border: 0;
	outline: none;
	background: transparent;
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	color: #000;
	min-width: 0;
}

.hub-explorer-search__input::placeholder {
	color: #94a3b8;
	font-weight: 500;
}

.hub-explorer-suggest {
	list-style: none;
	margin: 0 0 12px;
	padding: 6px;
	background: #fff;
	border: 2px solid #0f172a;
	border-radius: 12px;
	box-shadow: 3px 3px 0 #0f172a;
	max-height: 220px;
	overflow-y: auto;
}

.hub-explorer-suggest[hidden] {
	display: none;
}

.hub-explorer-suggest__item {
	padding: 8px;
	border-radius: 8px;
	cursor: pointer;
	font-size: 0.85rem;
	font-weight: 600;
	color: #0f172a;
}

.hub-explorer-suggest__item:hover,
.hub-explorer-suggest__item.is-active {
	background: #eef6ff;
}

/* ---------- Legend layer rows ---------- */

.hub-explorer-legend {
	list-style: none;
	margin: 0 0 8px;
	padding: 0;
	display: grid;
	gap: 2px;
}

.hub-explorer-legend__row {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	cursor: pointer;
	user-select: none;
	padding: 7px 10px;
	margin: 0;
	border: 2px solid transparent;
	border-radius: 8px;
	background: transparent;
	font: inherit;
	text-align: left;
	color: #0f172a;
	transition: background 0.15s ease, border-color 0.15s ease, opacity 0.12s ease;
	position: relative;
}

.hub-explorer-legend__row:hover,
.hub-explorer-legend__row:focus-visible {
	background: #f1f5f9;
	border-color: #0f172a;
	outline: none;
}

.hub-explorer-legend__row:not( .is-on ) {
	opacity: 0.45;
}

.hub-explorer-legend__row:not( .is-on ) .hub-explorer-legend__dot {
	background: transparent !important;
	box-shadow: inset 0 0 0 2.5px var( --layer, #64748b );
}

.hub-explorer-legend__row.is-on::before {
	content: '';
	position: absolute;
	left: 0;
	top: 6px;
	bottom: 6px;
	width: 3px;
	border-radius: 2px;
	background: #0f172a;
}

.hub-explorer-legend__dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	border: 2px solid #0f172a;
	background: var( --layer, #64748b );
	flex: 0 0 auto;
}

.hub-explorer-legend__label {
	flex: 1 1 auto;
	font-size: 0.85rem;
	font-weight: 700;
}

.hub-explorer-legend__count {
	margin-left: auto;
	font-size: 0.78rem;
	font-weight: 800;
	color: #6a7486;
}

.hub-explorer-keywords__note {
	margin: 0 0 6px;
	font-size: 0.72rem;
	color: #64748b;
	line-height: 1.35;
}

.hub-explorer-hint {
	margin: 10px 0 0;
	font-size: 0.78rem;
	color: #8a93a6;
	line-height: 1.45;
}

/* ---------- Detail card ---------- */

.hub-explorer-detail[hidden] {
	display: none !important;
}

.hub-explorer-detail {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Full-width “show all” bar — filled with hub accent so it’s obvious. */
.hub-explorer-back-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	margin: 0;
	padding: 12px 14px;
	border: 2.5px solid #0f172a;
	border-radius: 12px;
	background: var( --hub-explorer-accent, #5dd9d0 );
	box-shadow: 3px 3px 0 #0f172a;
	font: inherit;
	font-size: 0.92rem;
	font-weight: 800;
	color: #0f172a;
	text-align: left;
	cursor: pointer;
	transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.hub-explorer-back-bar:hover {
	transform: translateY( -1px );
	box-shadow: 4px 4px 0 #0f172a;
	filter: brightness( 1.05 );
}

.hub-explorer-back-bar:active {
	transform: translateY( 1px );
	box-shadow: 1px 1px 0 #0f172a;
}

.hub-explorer-back-bar:focus-visible {
	outline: 3px solid #0f172a;
	outline-offset: 2px;
}

.hub-explorer-back-bar__arrow {
	flex: 0 0 auto;
	font-size: 1.1rem;
	line-height: 1;
}

.hub-explorer-back-bar__label {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hub-explorer-back-bar__count {
	flex: 0 0 auto;
	padding: 2px 8px;
	border-radius: 999px;
	background: #fff;
	border: 2px solid #0f172a;
	color: #0f172a;
	font-size: 0.75rem;
	font-weight: 800;
	line-height: 1.3;
}

.hub-explorer-back-bar__count[hidden] {
	display: none !important;
}

/* Detail panel with close (X) — Google Maps dismiss pattern. */
.hub-explorer-detail__panel {
	position: relative;
	padding: 12px 12px 4px;
	border: 2.5px solid #0f172a;
	border-radius: 12px;
	background: #fff;
	box-shadow: 3px 3px 0 rgba( 15, 23, 42, 0.12 );
}

.hub-explorer-detail__close {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 2.5px solid #0f172a;
	border-radius: 999px;
	background: #fff;
	box-shadow: 2px 2px 0 #0f172a;
	color: #0f172a;
	font-size: 1.45rem;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	transition: background 0.12s ease, transform 0.12s ease;
}

.hub-explorer-detail__close:hover {
	background: #fee2e2;
	transform: scale( 1.05 );
}

.hub-explorer-detail__close:focus-visible {
	outline: 3px solid #5baeff;
	outline-offset: 2px;
}

/* Legacy thin back link (kept if an older shell is cached). */
.hub-explorer-back {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-bottom: 12px;
	padding: 0;
	border: 0;
	background: transparent;
	font: inherit;
	font-size: 0.82rem;
	font-weight: 800;
	color: #0b6aa2;
	cursor: pointer;
}

.hub-explorer-back:hover {
	text-decoration: underline;
}

.hub-explorer-detail__thumb {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border: 2px solid #0f172a;
	border-radius: 8px;
	margin-bottom: 12px;
	background: #e2e8f0;
}

.hub-explorer-detail__panel .hub-explorer-detail__name,
.hub-explorer-detail__panel .hub-explorer-detail__eyebrow {
	padding-right: 40px;
}

.hub-explorer-detail__eyebrow {
	margin: 0 0 4px;
	font-size: 0.68rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #64748b;
}

.hub-explorer-detail__name {
	margin: 0 0 8px;
	font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
	font-size: 1.15rem;
	font-weight: 800;
	line-height: 1.2;
	color: #0f172a;
}

.hub-explorer-detail__meta {
	margin: 0 0 10px;
	font-size: 0.85rem;
	font-weight: 600;
	color: #475569;
}

.hub-explorer-detail__excerpt {
	margin: 0 0 14px;
	font-size: 0.85rem;
	line-height: 1.5;
	color: #334155;
}

.hub-explorer-detail__badge {
	display: inline-block;
	margin-bottom: 10px;
	padding: 3px 8px;
	border: 2px solid #0f172a;
	border-radius: 4px;
	background: var( --hub-explorer-accent, #f5c842 );
	font-size: 0.68rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.hub-explorer-detail__foot {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 12px;
}

.hub-explorer-detail__go {
	display: inline-block;
	padding: 10px 14px;
	border: 2px solid #0f172a;
	border-radius: 8px;
	background: var( --hub-explorer-accent, #5dd9d0 );
	box-shadow: 3px 3px 0 #0f172a;
	font-size: 0.85rem;
	font-weight: 800;
	color: #000;
	text-decoration: none;
	text-align: center;
}

.hub-explorer-detail__link {
	font-size: 0.82rem;
	font-weight: 700;
	color: #0b6aa2;
}

.hub-explorer-detail__link--dirs {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 14px;
	box-sizing: border-box;
	font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
	font-weight: 800;
	font-size: 0.9rem;
	text-transform: none;
	letter-spacing: normal;
	color: #fff;
	background: #2563eb;
	border: 3px solid #2563eb;
	border-radius: 8px;
	text-decoration: none;
	box-shadow: 2px 2px 0 #000;
	transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.hub-explorer-detail__link--dirs:hover,
.hub-explorer-detail__link--dirs:focus-visible {
	transform: translate(-2px, -2px);
	background: #fff5fa;
	color: #c4006a;
	border-color: #ff3399;
	box-shadow: 0 0 0 2px rgba(255, 51, 153, 0.35), 4px 4px 0 #000;
	outline: none;
}

/* ---------- Atlas-style on-map chrome ---------- */

/* Floating search — same pill as the homepage atlas, top-left over the map. */
.hub-explorer-map-controls {
	position: absolute;
	top: 12px;
	left: 12px;
	right: 60px;
	z-index: 30;
	display: flex;
	flex-direction: column;
	gap: 6px;
	pointer-events: none;
}

.hub-explorer-map-controls > * {
	pointer-events: auto;
}

.hub-explorer-mapsearch {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	max-width: 340px;
	background: #fff;
	border: 2.5px solid #0f172a;
	border-radius: 999px;
	box-shadow: 3px 3px 0 #0f172a;
	padding: 8px 14px;
}

.hub-explorer-mapsearch__ic {
	font-size: 13px;
	line-height: 1;
	opacity: 0.7;
	flex: 0 0 auto;
}

.hub-explorer-mapsearch__input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	font: 700 14px 'Inter', system-ui, sans-serif;
	color: #0f172a;
}

.hub-explorer-mapsearch__input::placeholder {
	color: #97a1b0;
	font-weight: 600;
}

.hub-explorer-mapsearch__input::-webkit-search-cancel-button {
	display: none;
}

.hub-explorer-mapsearch__results {
	max-width: 340px;
	margin: 0;
}

/* LAYERS tile — Google Maps style, bottom-left base-layer toggle. */
.hub-explorer-layers-btn {
	position: absolute;
	left: 12px;
	right: auto;
	bottom: 28px;
	z-index: 30;
	width: 72px;
	height: 72px;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 8px;
	overflow: hidden;
	cursor: pointer;
	background: #cdd8e2 center/cover no-repeat;
	background-image: url('https://a.basemaps.cartocdn.com/rastertiles/voyager/11/995/691.png');
	box-shadow: 0 1px 4px rgba( 0, 0, 0, 0.3 );
}

.hub-explorer-layers-btn.is-satellite {
	background-color: #2d4a2e;
	background-image: url('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/11/691/995');
}

.hub-explorer-layers-btn__cap {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 3px;
	background: rgba( 32, 33, 36, 0.82 );
	color: #fff;
	font: 700 10px/1.2 'Roboto', 'Inter', system-ui, sans-serif;
	letter-spacing: 0.01em;
	padding: 4px 2px;
	text-align: center;
}

.hub-explorer-layers-btn__ico {
	flex: 0 0 auto;
	display: block;
}

.hub-explorer-layers-btn:hover {
	box-shadow: 0 2px 8px rgba( 0, 0, 0, 0.4 );
}

.hub-explorer-layers-btn:focus-visible {
	outline: 3px solid #4285F4;
	outline-offset: 2px;
}

/* Google Maps-style dark control stack — bottom-right (~half former size). */
.hub-explorer-gmaps-stack {
	position: absolute;
	right: 10px;
	bottom: 26px;
	z-index: 30;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0;
	padding: 3px;
	background: #202124;
	border-radius: 6px;
	box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.28 );
}

.hub-explorer-gmaps-stack__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	transition: background 0.12s ease;
}

.hub-explorer-gmaps-stack__btn:hover {
	background: rgba( 255, 255, 255, 0.12 );
}

.hub-explorer-gmaps-stack__btn:active {
	background: rgba( 255, 255, 255, 0.2 );
}

.hub-explorer-gmaps-stack__btn:focus-visible {
	outline: 2px solid #8ab4f8;
	outline-offset: 1px;
}

.hub-explorer-gmaps-stack__btn.is-loading {
	opacity: 0.55;
	pointer-events: none;
}

.hub-explorer-gmaps-stack__btn svg {
	display: block;
	width: 12px;
	height: 12px;
}

/* Hide Leaflet zoom + legacy fit when the Google-style stack is present. */
.hub-explorer-map-wrap:has( .hub-explorer-gmaps-stack ) .leaflet-control-zoom,
.hub-explorer-map-wrap:has( .hub-explorer-gmaps-stack ) .hub-explorer-fit-ctl {
	display: none !important;
}

/* Recenter (legacy Leaflet control — kept for non-explorer maps). */
.hub-explorer-fit-ctl {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 30px;
	height: 30px;
	background: #fff;
	border: 2px solid #0f172a !important;
	color: #0f172a;
	font-size: 16px;
	font-weight: 800;
	line-height: 1;
	text-decoration: none;
	border-radius: 4px;
}

.hub-explorer-fit-ctl:hover {
	background: #eef6ff;
}

/* Zoom buttons — atlas ink borders for non-explorer / fallback. */
.hub-explorer-map-wrap .leaflet-control-zoom a {
	box-sizing: border-box;
	width: 30px;
	height: 30px;
	line-height: 26px;
	border: 2px solid #0f172a !important;
	color: #0f172a;
	font-weight: 800;
}

/* ---------- Map pins ---------- */

.hub-explorer-pin--selected .hub-explorer-pin__dot {
	transform: scale( 1.35 );
	box-shadow: 0 0 0 3px #fff, 0 0 0 5px #000;
}

.hub-explorer-pin--selected .map-pin-town,
.hub-explorer-pin--selected .map-pin-village {
	transform: scale( 1.5 );
	box-shadow: 0 0 0 3px #fff, 0 0 0 5px #000;
}

.hub-explorer-pin__dot {
	display: block;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 2px solid #000;
	background: var( --pin-color, var( --hub-explorer-accent, #5dd9d0 ) );
	transition: transform 0.15s ease;
}

/* ---------- MAP view: dock essentials only ---------- */

body.duchy-sd-inner .map-view-active .ch-sd-filter-dock.is-collapsed .ch-sd-filter-dock__place,
body.duchy-sd-inner .map-view-active .ch-sd-filter-dock.is-collapsed .ch-sd-filter-dock__abc,
body.duchy-sd-inner .map-view-active .ch-sd-filter-dock.is-collapsed [data-filter-dim],
body.duchy-sd-inner .map-view-active .ch-sd-filter-dock.is-collapsed .ch-sd-filter-dock__towns,
body.duchy-sd-inner .map-view-active .ch-sd-filter-dock.is-collapsed .disco-sidebar-place,
body.duchy-sd-inner .map-view-active .ch-sd-filter-dock.is-collapsed .disco-sidebar-abc {
	display: none !important;
}

/* Place MAP: bottom discovery dock off; Grid + Towns/Villages/All live in the right rail. */
body.duchy-sd-inner.duchy-place-hub-map #filter-dock,
body.duchy-sd-inner #filter-dock.ch-sd-filter-dock--place-map-hidden {
	display: none !important;
	pointer-events: none !important;
	visibility: hidden !important;
}

body.duchy-sd-inner.duchy-place-hub-map .towns-hub-main.map-view-active {
	--duchy-dock-height: 0.75rem;
	--duchy-map-height: calc(100dvh - var(--duchy-sticky-subheader) - var(--duchy-breadcrumb-h) - 0.75rem);
}

/* Towns/villages MAP: Settlements shell fills the hub map pane (stay on /towns/). */
body.duchy-sd-inner .towns-hub-main.map-view-active #map-wrap-v.towns-hub-settlements-map.active {
	display: flex !important;
	flex-direction: row !important;
	width: 100% !important;
	height: 100% !important;
	min-height: 0 !important;
	max-height: none !important;
	overflow: hidden !important;
	border: 0 !important;
	background: #e8f0fe !important;
}

body.duchy-sd-inner .towns-hub-main.map-view-active #map-wrap-v.towns-hub-settlements-map .settlements-map-wrap {
	display: flex !important;
	flex: 1 1 auto !important;
	width: 100% !important;
	height: 100% !important;
	min-height: 0 !important;
	max-height: none !important;
	border: 0 !important;
}

body.duchy-sd-inner .towns-hub-main.map-view-active .ch-sd-hub-cta,
body.duchy-sd-inner.duchy-place-hub-map .ch-sd-hub-cta {
	display: none !important;
}

.settlements-map-wrap--hub-embed .settlements-map-view-row {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-items: stretch;
	gap: 0.35rem;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin-bottom: 0.45rem;
	box-sizing: border-box;
}

.settlements-map-wrap--hub-embed .settlements-map-view-btn {
	display: flex !important;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	height: 2.5rem;
	margin: 0 !important;
	padding: 0 0.4rem !important;
	border: 2px solid #1a1a1a !important;
	border-radius: 8px !important;
	font-family: 'Inter', 'Segoe UI', system-ui, sans-serif !important;
	font-size: 0.6875rem !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.02em !important;
	line-height: 1.1 !important;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	box-shadow: 2px 2px 0 #1a1a1a !important;
	flex: none !important;
	align-self: stretch !important;
	max-width: none !important;
}

.settlements-map-wrap--hub-embed .settlements-map-view-btn--back {
	background: #ffd200 !important;
	color: #1a1a1a !important;
}

.settlements-map-wrap--hub-embed .settlements-map-view-btn--back-idle {
	opacity: 0.42;
	pointer-events: none;
}

.settlements-map-wrap--hub-embed .settlements-map-view-btn--back:not(.settlements-map-view-btn--back-idle) {
	opacity: 1;
	pointer-events: auto;
}

.settlements-map-wrap--hub-embed .settlements-map-view-btn--back:hover:not(.settlements-map-view-btn--back-idle),
.settlements-map-wrap--hub-embed .settlements-map-view-btn--back:focus-visible:not(.settlements-map-view-btn--back-idle) {
	background: #ffe566 !important;
}

.settlements-map-wrap--hub-embed .settlements-map-view-btn--grid,
.settlements-map-wrap--hub-embed .settlements-map-view-btn--map {
	background: #fff !important;
	color: #475569 !important;
	box-shadow: 1px 1px 0 rgba(15, 23, 42, 0.18) !important;
	border-color: rgba(15, 23, 42, 0.14) !important;
}

.settlements-map-wrap--hub-embed .settlements-map-view-btn--grid:hover:not(.active),
.settlements-map-wrap--hub-embed .settlements-map-view-btn--map:hover:not(.active) {
	background: #f8fafc !important;
}

.settlements-map-wrap--hub-embed .settlements-map-view-btn--grid.active,
.settlements-map-wrap--hub-embed .settlements-map-view-btn--map.active {
	background: var(--ch-sd-dock-accent, #2563eb) !important;
	color: #fff !important;
	border-color: #1a1a1a !important;
	box-shadow: 2px 2px 0 #1a1a1a !important;
}

.settlements-map-wrap--hub-embed .settlements-map-view-btn:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 1px;
}

.settlements-map-wrap--hub-embed .settlements-map-search--head {
	margin-top: 0;
}

.settlements-map-wrap--hub-embed .settlements-map-close--hub-embed {
	display: none !important;
}

/*
 * Hub embed is a fixed-height pane. Keep the right rail scrolling so long
 * parish place lists stay reachable (desktop explorer otherwise grows the page).
 */
@media (min-width: 901px) {
	body.duchy-sd-inner .towns-hub-main.map-view-active .settlements-map-wrap--hub-embed,
	body.duchy-sd-inner .towns-hub-main.map-view-active .settlements-map-wrap--hub-embed.is-showing-detail {
		align-items: stretch !important;
		height: 100% !important;
		max-height: none !important;
		min-height: 0 !important;
	}

	body.duchy-sd-inner .towns-hub-main.map-view-active .settlements-map-wrap--hub-embed .settlements-map-canvas,
	body.duchy-sd-inner .towns-hub-main.map-view-active .settlements-map-wrap--hub-embed.is-showing-detail .settlements-map-canvas {
		height: 100% !important;
		min-height: 0 !important;
		position: relative !important;
		top: auto !important;
		align-self: stretch !important;
	}

	body.duchy-sd-inner .towns-hub-main.map-view-active .settlements-map-wrap--hub-embed .settlements-map-sidebar,
	body.duchy-sd-inner .towns-hub-main.map-view-active .settlements-map-wrap--hub-embed .settlements-map-sidebar.is-showing-detail {
		display: flex !important;
		flex-direction: column !important;
		height: 100% !important;
		max-height: 100% !important;
		min-height: 0 !important;
		overflow: hidden !important;
		align-self: stretch !important;
	}

	body.duchy-sd-inner .towns-hub-main.map-view-active .settlements-map-wrap--hub-embed .settlements-map-sidebar__body,
	body.duchy-sd-inner .towns-hub-main.map-view-active .settlements-map-wrap--hub-embed .settlements-map-sidebar.is-showing-detail .settlements-map-sidebar__body {
		flex: 1 1 auto !important;
		min-height: 0 !important;
		overflow-x: hidden !important;
		overflow-y: auto !important;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
	}
}

@media (max-width: 900px) {
	body.duchy-sd-inner .towns-hub-main.map-view-active #map-wrap-v.towns-hub-settlements-map.active {
		flex-direction: column !important;
		display: block !important;
		position: relative !important;
		height: 100% !important;
		min-height: 0 !important;
		overflow: hidden !important;
	}

	body.duchy-sd-inner .towns-hub-main.map-view-active .settlements-map-wrap--hub-embed,
	body.duchy-sd-inner .towns-hub-main.map-view-active .settlements-map-wrap--hub-embed.is-showing-detail {
		display: block !important;
		position: relative !important;
		height: 100% !important;
		max-height: 100% !important;
		min-height: 0 !important;
		overflow: hidden !important;
	}

	body.duchy-sd-inner .towns-hub-main.map-view-active .settlements-map-wrap--hub-embed .settlements-map-canvas,
	body.duchy-sd-inner .towns-hub-main.map-view-active .settlements-map-wrap--hub-embed.is-showing-detail .settlements-map-canvas {
		position: absolute !important;
		inset: 0 !important;
		height: 100% !important;
		min-height: 0 !important;
		width: 100% !important;
	}

	body.duchy-sd-inner .towns-hub-main.map-view-active .settlements-map-wrap--hub-embed .settlements-map-sidebar--hub-embed,
	body.duchy-sd-inner .towns-hub-main.map-view-active .settlements-map-wrap--hub-embed .settlements-map-sidebar.is-showing-detail {
		position: absolute !important;
		left: 0 !important;
		right: 0 !important;
		bottom: 0 !important;
		top: auto !important;
		height: min(58dvh, calc(100% - 140px)) !important;
		max-height: calc(100% - 110px) !important;
		width: auto !important;
		overflow: hidden !important;
	}

	body.duchy-sd-inner .towns-hub-main.map-view-active .settlements-map-sidebar--hub-embed.is-peek {
		height: auto !important;
		min-height: 52px;
		max-height: 118px !important;
	}

	body.duchy-sd-inner .towns-hub-main.map-view-active .settlements-map-sidebar--hub-embed.is-half {
		height: min(48dvh, 340px) !important;
		max-height: calc(100% - 110px) !important;
	}

	body.duchy-sd-inner .towns-hub-main.map-view-active .settlements-map-sidebar--hub-embed.is-full {
		height: min(60dvh, calc(100% - 110px)) !important;
		max-height: calc(100% - 110px) !important;
	}

	body.duchy-sd-inner .towns-hub-main.map-view-active .settlements-map-sidebar--hub-embed.is-peek:not(.is-showing-detail) .settlements-map-sidebar__body {
		display: none !important;
	}

	body.duchy-sd-inner .towns-hub-main.map-view-active .settlements-map-sidebar--hub-embed.is-peek:not(.is-showing-detail) .settlements-map-search--head {
		display: none !important;
	}

	/* Detail open: never collapse to a blank lip — keep parish card visible. */
	body.duchy-sd-inner .towns-hub-main.map-view-active .settlements-map-sidebar--hub-embed.is-showing-detail.is-peek,
	body.duchy-sd-inner .towns-hub-main.map-view-active .settlements-map-sidebar.is-showing-detail.is-peek {
		height: min(48dvh, 340px) !important;
		max-height: calc(100% - 110px) !important;
		min-height: 220px;
	}

	body.duchy-sd-inner .towns-hub-main.map-view-active .settlements-map-sidebar--hub-embed.is-showing-detail.is-peek .settlements-map-sidebar__body,
	body.duchy-sd-inner .towns-hub-main.map-view-active .settlements-map-sidebar.is-showing-detail.is-peek .settlements-map-sidebar__body {
		display: block !important;
		flex: 1 1 auto !important;
		min-height: 0 !important;
		overflow-y: auto !important;
	}
}

/* Place mode: no floating map search (sheet/rail search only). */
.hub-explorer-map-wrap[data-explorer-mode="place"] .hub-explorer-map-controls {
	display: none !important;
}

/* ---------- Mobile: panel as bottom sheet ---------- */

@media ( max-width: 900px ) {
	body.duchy-sd-inner #map-wrap-v.active.ch-sd-hub-map-wrap.duchy-explorer-wrap.hub-explorer-map-wrap,
	.ch-sd-hub-map-wrap.duchy-explorer-wrap.hub-explorer-map-wrap.active {
		flex-direction: column !important;
		height: var(--duchy-map-height, min(86vh, calc(100vh - 140px))) !important;
		min-height: min(420px, var(--duchy-map-height, 420px)) !important;
		max-height: none !important;
		max-width: 100% !important;
		overflow: hidden !important;
		display: block !important;
		position: relative !important;
	}

	.hub-explorer-map-canvas {
		position: absolute;
		inset: 0;
		height: auto;
		min-height: 0;
	}

	.hub-explorer-map-leaflet {
		min-height: 0;
		height: 100%;
	}

	.hub-explorer-sidebar {
		position: absolute;
		left: 0;
		right: 0;
		top: auto;
		bottom: 0;
		flex: none;
		max-width: none;
		width: auto;
		border-left: 0;
		border-top: 3px solid #000;
		border-radius: 16px 16px 0 0;
		z-index: 45;
		height: 46%;
		/* Never taller than the map wrap — vh-based full used to clip the grip. */
		max-height: 100%;
		transition: height 0.26s cubic-bezier( 0.4, 0.14, 0.3, 1 ), top 0.26s cubic-bezier( 0.4, 0.14, 0.3, 1 );
		box-shadow: 0 -4px 0 rgba( 5, 5, 9, 0.08 );
	}

	.hub-explorer-sidebar.is-min {
		top: auto;
		height: 44px;
		min-height: 44px;
		max-height: 44px;
		overflow: hidden;
		border-radius: 16px 16px 0 0;
	}

	.hub-explorer-sidebar.is-min .hub-explorer-sidebar__band,
	.hub-explorer-sidebar.is-min .hub-explorer-sidebar__body {
		display: none !important;
	}

	.hub-explorer-sidebar.is-peek {
		top: auto;
		height: auto;
		min-height: 88px;
		max-height: 128px;
		overflow: hidden;
	}

	/* Services peek: compact 3×2 — keep sheet short so Cornwall stays visible. */
	.hub-explorer-sidebar.is-peek:has( .hub-explorer-peek-chips--grid ) {
		max-height: 142px;
	}

	.hub-explorer-sidebar.is-half {
		top: auto;
		height: 48%;
		max-height: 100%;
	}

	/* Leave a map strip above so the grip stays on-screen and tappable.
	   Use top+bottom (not % height) so it always fills the map wrap. */
	.hub-explorer-sidebar.is-full {
		top: 52px;
		bottom: 0;
		height: auto;
		max-height: none;
	}

	/* Tap-target hint arrow — flips when sheet is fully open (settlements parity). */

	.hub-explorer-sidebar__collapse {
		flex: 0 0 auto;
		display: none;
		align-items: center;
		gap: 6px;
		margin: 0;
		padding: 6px 10px;
		border: 2px solid rgba( 255, 255, 255, 0.55 );
		border-radius: 999px;
		background: rgba( 255, 255, 255, 0.12 );
		color: #fff;
		font: inherit;
		font-size: 0.72rem;
		font-weight: 800;
		letter-spacing: 0.03em;
		text-transform: uppercase;
		cursor: pointer;
		appearance: none;
		-webkit-appearance: none;
	}

	/* Half/full: band is also a drag surface to collapse the sheet. */
	.hub-explorer-sidebar.is-half .hub-explorer-sidebar__band,
	.hub-explorer-sidebar.is-full .hub-explorer-sidebar__band {
		touch-action: none;
		cursor: grab;
	}

	.hub-explorer-sidebar.is-half .hub-explorer-sidebar__collapse,
	.hub-explorer-sidebar.is-full .hub-explorer-sidebar__collapse {
		display: inline-flex;
		position: relative;
		z-index: 3;
	}

	.hub-explorer-sidebar__collapse-x {
		font-size: 1.15rem;
		line-height: 1;
		font-weight: 700;
	}

	.hub-explorer-peek-chips {
		display: none;
		gap: 6px;
		margin: 8px 0 0;
		padding: 0 0 2px;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.hub-explorer-peek-chips::-webkit-scrollbar {
		display: none;
	}

	.hub-explorer-sidebar.is-peek .hub-explorer-peek-chips {
		display: flex;
	}

	.hub-explorer-sidebar.is-peek .hub-explorer-peek-chips--grid {
		display: grid;
		grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
		gap: 4px;
		overflow: visible;
		margin-top: 4px;
	}

	.hub-explorer-peek-chips--grid .hub-explorer-peek-chip {
		flex: unset;
		width: 100%;
		min-height: 1.85rem;
		justify-content: flex-start;
		gap: 3px;
		padding: 0.22rem 0.3rem 0.22rem 0.28rem;
		border-radius: 4px;
		border-width: 1.5px;
		border-left-width: 3px;
		border-left-color: var( --layer, #5dd9d0 );
		font-size: 0.62rem;
		letter-spacing: 0;
		white-space: nowrap;
		line-height: 1.1;
		text-align: left;
		overflow: hidden;
	}

	.hub-explorer-peek-chip {
		flex: 0 0 auto;
		display: inline-flex;
		align-items: center;
		gap: 5px;
		margin: 0;
		padding: 5px 10px 5px 7px;
		border: 2px solid rgba( 255, 255, 255, 0.45 );
		border-radius: 999px;
		background: rgba( 255, 255, 255, 0.1 );
		color: #fff;
		font: inherit;
		font-size: 0.72rem;
		font-weight: 800;
		letter-spacing: 0.02em;
		white-space: nowrap;
		cursor: pointer;
		appearance: none;
		-webkit-appearance: none;
	}

	.hub-explorer-peek-chips--grid .hub-explorer-peek-chip__label {
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.hub-explorer-peek-chips--grid .hub-explorer-peek-chip__icon {
		font-size: 0.75rem;
	}

	.hub-explorer-peek-chip.is-on {
		background: var( --layer, #5dd9d0 );
		border-color: #fff;
		color: #0f172a;
	}

	.hub-explorer-peek-chips--grid .hub-explorer-peek-chip.is-on {
		border-left-color: #0f172a;
	}

	.hub-explorer-peek-chip__dot {
		width: 8px;
		height: 8px;
		border-radius: 50%;
		background: var( --layer, #5dd9d0 );
		border: 1.5px solid #fff;
		flex: 0 0 auto;
	}

	.hub-explorer-peek-chip__icon {
		flex: 0 0 auto;
		font-size: 0.95rem;
		line-height: 1;
	}

	.hub-explorer-peek-chip.is-on .hub-explorer-peek-chip__dot {
		background: #0f172a;
		border-color: #0f172a;
	}

	.hub-explorer-peek-chip__label {
		min-width: 0;
	}

	.hub-explorer-sidebar.is-peek .hub-explorer-sidebar__body {
		overflow: hidden;
	}

	.hub-explorer-sidebar.is-peek .hub-explorer-stats,
	.hub-explorer-sidebar.is-peek .hub-explorer-search,
	.hub-explorer-sidebar.is-peek .hub-explorer-suggest,
	.hub-explorer-sidebar.is-peek .hub-explorer-layers,
	.hub-explorer-sidebar.is-peek .hub-explorer-keywords,
	.hub-explorer-sidebar.is-peek .hub-explorer-hint,
	.hub-explorer-sidebar.is-peek .hub-explorer-loading,
	.hub-explorer-sidebar.is-peek .hub-explorer-detail {
		display: none !important;
	}

	.hub-explorer-sidebar.is-peek .hub-explorer-sidebar__band {
		padding: 4px 12px 10px;
	}

	.hub-explorer-sidebar.is-peek .hub-explorer-sidebar__band-title {
		font-size: 0.95rem;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.hub-explorer-sidebar.is-peek .hub-explorer-sidebar__band-sub {
		display: none;
	}

	/* De-clutter mobile: the bottom sheet already has search, so hide the
	   floating on-map search bar; keep zoom / recenter / LAYERS only. */
	.hub-explorer-map-controls {
		display: none;
	}

}

/* ---------- Place mode (Towns & Villages): Settlements chrome ---------- */

.hub-explorer-sidebar--place .hub-explorer-sidebar__head {
	background: var(--hub-explorer-accent, #5dd9d0);
	color: #0f4038;
	border-bottom: 0;
}

.hub-explorer-sidebar--place .hub-explorer-sidebar__head h2 {
	margin: 0;
	font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
	font-size: 1.05rem;
	font-weight: 700;
	text-transform: none;
	letter-spacing: normal;
	color: inherit;
	line-height: 1.2;
}

.hub-explorer-sidebar--place .hub-explorer-sidebar__head-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.5rem;
}

.hub-explorer-sidebar--place .hub-explorer-sidebar__head-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
}

.hub-explorer-sidebar--place .hub-explorer-grid-exit {
	appearance: none;
	border: 2px solid #0f172a;
	border-radius: 999px;
	background: #fff;
	color: #0f172a;
	font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: normal;
	text-transform: none;
	line-height: 1;
	padding: 0.42rem 0.7rem;
	cursor: pointer;
	box-shadow: 1px 1px 0 #0f172a;
}

.hub-explorer-sidebar--place .hub-explorer-grid-exit:hover,
.hub-explorer-sidebar--place .hub-explorer-grid-exit:focus-visible {
	background: #f8fafc;
}

.hub-explorer-sidebar--place .hub-explorer-grid-exit:active {
	transform: translate(1px, 1px);
	box-shadow: none;
}

.hub-explorer-sidebar--place .hub-explorer-sidebar__sub {
	font-size: 0.78rem;
	opacity: 0.9;
	color: inherit;
	margin: 0;
}

.hub-explorer-sidebar--place .hub-explorer-search--head {
	margin: 0;
	border-radius: 8px;
	border-width: 2px;
}

.hub-explorer-sidebar--place .hub-explorer-suggest {
	margin-top: 0.25rem;
}

.hub-explorer-sidebar--place .hub-explorer-sidebar__body {
	background: #f8f9fa;
	padding: 0.85rem 0.9rem 1rem;
}

.hub-explorer-sidebar--place .hub-explorer-type-filters {
	margin-bottom: 0.65rem;
}

.hub-explorer-sidebar--place .hub-explorer-type-filters--place-presets {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.4rem;
}

.hub-explorer-sidebar--place .hub-explorer-type-filters__swatch--all {
	background: linear-gradient(135deg, var(--duchy-place-town, #2b6cb0) 50%, var(--duchy-place-village, #2f855a) 50%);
}

.hub-explorer-sidebar--place .hub-explorer-detail__panel.settlements-map-parish-card {
	position: relative;
	margin: 0;
}

.hub-explorer-sidebar--place .hub-explorer-detail__close {
	position: absolute;
	top: 0.45rem;
	right: 0.45rem;
	z-index: 2;
}

@media (min-width: 901px) {
	.hub-explorer-sidebar--place.is-showing-detail > .hub-explorer-sidebar__head > .hub-explorer-sidebar__head-row,
	.hub-explorer-sidebar--place.is-showing-detail > .hub-explorer-sidebar__head > .hub-explorer-sidebar__sub {
		display: none !important;
	}

	.hub-explorer-sidebar--place.is-showing-detail .hub-explorer-detail__close {
		display: none !important;
	}
}

@media (max-width: 900px) {
	.hub-explorer-sidebar--place.is-peek {
		min-height: 148px;
		max-height: 188px;
	}

	.hub-explorer-sidebar--place.is-peek .hub-explorer-type-filters,
	.hub-explorer-sidebar--place.is-peek .settlements-map-results-hint,
	.hub-explorer-sidebar--place.is-peek .hub-explorer-stats,
	.hub-explorer-sidebar--place.is-peek .hub-explorer-detail {
		display: none !important;
	}

	.hub-explorer-sidebar--place.is-peek .hub-explorer-sidebar__body {
		display: none;
	}

	.hub-explorer-sidebar--place.is-peek .hub-explorer-sidebar__head {
		padding: 0.55rem 0.75rem 0.65rem;
	}

	/* Settlements pattern: search stays in the peek card (dock search is gone). */
	.hub-explorer-sidebar--place.is-peek .hub-explorer-search--head {
		display: flex !important;
	}

	.hub-explorer-sidebar--place.is-peek .hub-explorer-suggest {
		display: block !important;
	}

	.hub-explorer-sidebar--place.is-peek .hub-explorer-sidebar__sub {
		display: none;
	}

	.hub-explorer-sidebar--place.is-half .hub-explorer-sidebar__collapse,
	.hub-explorer-sidebar--place.is-full .hub-explorer-sidebar__collapse {
		display: inline-flex;
	}
}

/* Listing hub map (STAY/FOOD/FUN/SHOP/SERVICES): unified bottom stack on mobile. */
@media ( max-width: 900px ) {
	body.duchy-listing-hub-map .hub-explorer-sidebar {
		border-top: none;
		border-radius: 20px 20px 0 0;
		box-shadow: 0 -10px 36px rgba( 15, 23, 42, 0.1 );
		background: #fff;
	}

	/* Hide floating chrome on the map canvas only — lip slots keep Layers + stack. */
	body.duchy-listing-hub-map .hub-explorer-map-canvas > .hub-explorer-layers-btn,
	body.duchy-listing-hub-map .hub-explorer-map-canvas > .hub-explorer-gmaps-stack,
	body.duchy-listing-hub-map .hub-explorer-map-canvas > .duchy-map-chrome-layers,
	body.duchy-listing-hub-map .hub-explorer-map-canvas > .duchy-map-chrome-stack {
		display: none !important;
	}

	body.duchy-listing-hub-map [data-duchy-sheet-lip-left] .hub-explorer-layers-btn,
	body.duchy-listing-hub-map [data-duchy-sheet-lip-left] .duchy-map-chrome-layers {
		display: block !important;
		position: relative !important;
		left: auto !important;
		right: auto !important;
		top: auto !important;
		bottom: auto !important;
		width: 100% !important;
		height: 100% !important;
		min-height: 0;
		border: 0 !important;
		border-radius: 0 !important;
		box-shadow: none !important;
	}

	body.duchy-listing-hub-map [data-duchy-sheet-lip-right] .hub-explorer-gmaps-stack,
	body.duchy-listing-hub-map [data-duchy-sheet-lip-right] .duchy-map-chrome-stack {
		display: flex !important;
		position: relative !important;
		left: auto !important;
		right: auto !important;
		top: auto !important;
		bottom: auto !important;
		flex-direction: row !important;
		align-items: center !important;
		height: 100% !important;
		padding: 0 4px !important;
		gap: 0 !important;
		background: #0f172a !important;
		border-radius: 0 !important;
		box-shadow: none !important;
	}

	body.duchy-listing-hub-map [data-duchy-sheet-lip-right] .hub-explorer-gmaps-stack__btn {
		width: 32px !important;
		height: 32px !important;
		min-width: 32px !important;
		min-height: 32px !important;
		border-radius: 6px !important;
	}

	/* Collapsed map: keep the rounded tab (lip) visible — hide sheet content only. */
	body.duchy-listing-hub-map .hub-explorer-sidebar.is-peek:not( .is-half ):not( .is-full ):not( .is-showing-detail ),
	body.duchy-listing-hub-map .hub-explorer-sidebar.is-min {
		top: auto;
		height: auto;
		min-height: 52px;
		max-height: 52px;
		overflow: hidden;
		pointer-events: auto;
		border-radius: 20px 20px 0 0;
		box-shadow: 0 -10px 36px rgba( 15, 23, 42, 0.1 );
	}

	body.duchy-listing-hub-map .hub-explorer-sidebar.is-peek:not( .is-half ):not( .is-full ):not( .is-showing-detail ) .hub-explorer-sidebar__band,
	body.duchy-listing-hub-map .hub-explorer-sidebar.is-peek:not( .is-half ):not( .is-full ):not( .is-showing-detail ) .hub-explorer-sidebar__body,
	body.duchy-listing-hub-map .hub-explorer-sidebar.is-peek:not( .is-half ):not( .is-full ):not( .is-showing-detail ) .hub-explorer-peek-chips,
	body.duchy-listing-hub-map .hub-explorer-sidebar.is-min .hub-explorer-sidebar__band,
	body.duchy-listing-hub-map .hub-explorer-sidebar.is-min .hub-explorer-sidebar__body,
	body.duchy-listing-hub-map .hub-explorer-sidebar.is-min .hub-explorer-peek-chips {
		display: none !important;
	}

	/* Detail open: do not squash to lip-only when user collapses the sheet. */
	body.duchy-listing-hub-map .hub-explorer-sidebar.is-showing-detail.is-peek:not( .is-half ):not( .is-full ) {
		height: min( 48dvh, 340px ) !important;
		max-height: calc( 100% - 8px ) !important;
		min-height: 200px;
		overflow: hidden;
		pointer-events: auto;
	}

	body.duchy-listing-hub-map .hub-explorer-sidebar.is-showing-detail.is-peek .hub-explorer-sidebar__body,
	body.duchy-listing-hub-map .hub-explorer-sidebar.is-showing-detail.is-peek .hub-explorer-detail {
		display: block !important;
	}

	body.duchy-listing-hub-map .hub-explorer-sidebar.is-half,
	body.duchy-listing-hub-map .hub-explorer-sidebar.is-full {
		pointer-events: auto;
		overflow: hidden;
	}

	body.duchy-listing-hub-map .hub-explorer-sidebar.is-half .hub-explorer-sidebar__band,
	body.duchy-listing-hub-map .hub-explorer-sidebar.is-full .hub-explorer-sidebar__band {
		background: #fff;
		color: #0f172a;
		border-bottom: 1px solid #e2e8f0;
		padding: 10px 14px 12px;
	}

	body.duchy-listing-hub-map .hub-explorer-sidebar.is-half .hub-explorer-sidebar__band-title,
	body.duchy-listing-hub-map .hub-explorer-sidebar.is-full .hub-explorer-sidebar__band-title {
		color: #0f172a;
		font-weight: 800;
	}

	body.duchy-listing-hub-map .hub-explorer-sidebar.is-half .hub-explorer-peek-chips--grid,
	body.duchy-listing-hub-map .hub-explorer-sidebar.is-full .hub-explorer-peek-chips--grid {
		display: flex;
		flex-wrap: nowrap;
		grid-template-columns: unset;
		overflow-x: auto;
		overflow-y: hidden;
		gap: 6px;
		margin-top: 8px;
		padding-bottom: 2px;
		-webkit-overflow-scrolling: touch;
	}

	body.duchy-listing-hub-map .hub-explorer-sidebar.is-half .hub-explorer-peek-chips--grid .hub-explorer-peek-chip,
	body.duchy-listing-hub-map .hub-explorer-sidebar.is-full .hub-explorer-peek-chips--grid .hub-explorer-peek-chip {
		flex: 0 0 auto;
		width: auto;
		min-height: 2rem;
		padding: 0.35rem 0.75rem;
		border: 1px solid #e2e8f0;
		border-left-width: 1px;
		border-left-color: #e2e8f0;
		border-radius: 999px;
		background: #f8fafc;
		color: #475569;
		font-size: 0.72rem;
		font-weight: 600;
		letter-spacing: normal;
		justify-content: center;
	}

	body.duchy-listing-hub-map .hub-explorer-sidebar.is-half .hub-explorer-peek-chip.is-on,
	body.duchy-listing-hub-map .hub-explorer-sidebar.is-full .hub-explorer-peek-chip.is-on {
		background: var( --layer, #5dd9d0 );
		border-color: transparent;
		color: #0f172a;
	}
}
