.map-shell {
	position: relative;
	width: 100%;
	height: min(100vh, 960px);
	min-height: 72vh;
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid #d9e0e6;
	background: #e9eef5;
}

.map-frame {
	position: absolute;
	inset: 0;
	height: 100%;
	min-height: 100%;
}
.sidebar-frame {
	min-width: 0;
	border: 1px solid #d9e0e6;
	border-radius: 14px;
	overflow: auto;
	background: #fafcff;
	max-height: min(70vh, 760px);
}
.sidebar-frame #activeList .list-group-item { cursor: pointer; }
.sidebar-frame #activeList .list-group-item:hover { background: #f0f8ff; }

.sample-preview .table { margin-bottom: 0; }

.sample-preview th,
.sample-preview td {
	vertical-align: top;
	white-space: nowrap;
}

/* custom popup card style */
.leaflet-popup.festival-popup .leaflet-popup-content-wrapper {
	border-radius: 14px;
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
	background: linear-gradient(180deg, #fffef8 0%, #fff6dd 100%);
	border: 1px solid #f0deb2;
}

.leaflet-popup.festival-popup .leaflet-popup-content {
	margin: 12px 14px;
	color: #3a2d0f;
	font-size: 13px;
	line-height: 1.5;
	max-height: min(60vh, 420px);
	overflow: auto;
}

.leaflet-popup.festival-popup .leaflet-popup-content strong {
	display: inline-block;
	margin-bottom: 4px;
	font-size: 15px;
	letter-spacing: 0.02em;
	color: #1f3a5f;
}

.leaflet-popup.festival-popup .popup-title {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	color: #1f3a5f;
	margin-bottom: 6px;
}

.leaflet-popup.festival-popup .popup-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 2px;
}

.leaflet-popup.festival-popup .popup-tag {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	background: #f4f1e7;
	border: 1px solid #ddd3bb;
	font-size: 10px;
	font-weight: 500;
	color: #6d6656;
}

.leaflet-popup.festival-popup .popup-shift-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.leaflet-popup.festival-popup .popup-card {
	max-height: min(60vh, 420px);
	overflow: auto;
	padding-right: 2px;
	overscroll-behavior: contain;
}

.leaflet-popup.festival-popup .popup-shift-item,
.leaflet-popup.festival-popup .popup-shift-empty {
	font-size: 12px;
	line-height: 1.45;
	padding: 3px 0;
	color: #3f3521;
}

.leaflet-popup.festival-popup .popup-shift-item {
	display: flex;
	align-items: center;
	gap: 6px;
}

.leaflet-popup.festival-popup .popup-shift-text {
	display: inline-block;
}

.leaflet-popup.festival-popup .popup-shift-item.is-active {
	font-weight: 700;
	font-size: 13px;
	color: #063c1d;
	background: #e6ffe8;
	border-left: 4px solid #1f9d4c;
	border-radius: 6px;
	padding: 4px 8px;
	border-top: 1px solid #b7e9bf;
	border-right: 1px solid #b7e9bf;
	border-bottom: 1px solid #b7e9bf;
}

.leaflet-popup.festival-popup .popup-shift-badge {
	display: inline-block;
	font-size: 10px;
	font-weight: 800;
	line-height: 1;
	padding: 3px 6px;
	border-radius: 999px;
	color: #ffffff;
	background: #1f9d4c;
	letter-spacing: 0.04em;
}

.leaflet-popup.festival-popup .leaflet-popup-tip {
	background: #fff6dd;
}

.map-frame .leaflet-container {
	width: 100%;
	height: 100%;
}

@media (max-width: 992px) {
	.map-shell {
		height: auto;
		min-height: 0;
		overflow: visible;
	}

	.map-frame {
		position: relative;
		inset: auto;
		height: 60vh;
		min-height: 60vh;
	}

	.map-overlay {
		position: static !important;
		top: auto;
		right: auto;
		left: auto;
		bottom: auto;
		width: 100% !important;
		max-width: 100% !important;
		max-height: none !important;
		margin: 0.75rem 0 0 !important;
		box-shadow: none !important;
		box-sizing: border-box;
	}

	.map-overlay .list-group {
		max-height: none;
	}
}

@media (max-width: 576px) {
	.map-frame {
		height: 56vh;
		min-height: 56vh;
	}

	.map-overlay {
		padding: 0.75rem !important;
	}
}

.map-overlay {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 1000;
	width: min(360px, calc(100vw - 2rem));
	max-height: calc(100% - 2rem);
	overflow: auto;
	backdrop-filter: blur(10px);
	background: rgba(250, 252, 255, 0.92);
	box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
}

.map-overlay .list-group {
	max-height: calc(100% - 42px);
	overflow: auto;
}
