/*
 * World Volcano Map: tokens, masthead, stage, map layers, legend, card, controls.
 * Contract: CONTRACT.md sections 4 and 8. Light tokens on :root, dark on
 * prefers-color-scheme (there is no theme toggle). The masthead and footer stay
 * navy in both themes. The dot colours are the dataviz-validated ordinal ramp.
 *
 * The dynamic interface (search results, card states, selection) is styled between
 * the ui:start and ui:end markers and owned by the script; everything else here is
 * what the server renders. No !important anywhere.
 */

:root {
	--vm-serif: Fraunces, 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
	--vm-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	--vm-bg: #f3f6fb;
	--vm-surface: #fff;
	--vm-surface2: #eef2f9;
	--vm-ink: #0f1b38;
	--vm-dim: #475b84;
	--vm-line: #d3dcec;
	--vm-link: #0a6b5e;
	--vm-accent: #0a7566;
	--vm-land: #f3f0e8;
	--vm-sea: #d9e6f3;
	--vm-coast: #8da2b8;
	--vm-d2: #d08b4e;
	--vm-d1: #c0561a;
	--vm-act: #8a1d08;
	--vm-halo: #e8501f;
	--vm-plate: #7b88a3;
	--vm-ring: #5b4bc4;
	--vm-on-ring: #fff;
	--vm-shadow: 0 10px 30px rgba(15, 27, 56, 0.16);
	--vm-mast-h: 56px;
	--vm-topbar-h: 76px;
	--vm-side-w: 340px;
	--vm-peek: 128px;
}

@media (prefers-color-scheme: dark) {
	:root {
		--vm-bg: #070d1c;
		--vm-surface: #101a33;
		--vm-surface2: #16213f;
		--vm-ink: #e8eefc;
		--vm-dim: #a9b8d6;
		--vm-line: #26365a;
		--vm-link: #5eead4;
		--vm-accent: #3de0c4;
		--vm-land: #34425c;
		--vm-sea: #1b2a44;
		--vm-coast: #5f7192;
		--vm-d2: #bd6a36;
		--vm-d1: #e5803c;
		--vm-act: #ffc58f;
		--vm-halo: #ffb070;
		--vm-ring: #a99cff;
		--vm-on-ring: #0b1530;
		--vm-shadow: 0 12px 34px rgba(0, 0, 0, 0.55);
	}
}

html {
	color-scheme: light dark;
	-webkit-text-size-adjust: 100%;
}

body.vm-body {
	margin: 0;
	color: var(--vm-ink);
	font: 16px / 1.5 var(--vm-sans);
	background: var(--vm-bg);
}

.vm-body *,
.vm-body *::before,
.vm-body *::after {
	box-sizing: border-box;
}

.vm-body [hidden] {
	display: none;
}

.vm-body :focus-visible {
	outline: 2px solid var(--vm-ink);
	outline-offset: 2px;
}

:where(.vm-body) :is(button, input) {
	font: inherit;
	color: inherit;
}

.vm-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ---------------------------------------------------------------- masthead */

.vm-mast {
	position: relative;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	height: var(--vm-mast-h);
	padding: 0 20px;
	color: #e8eefc;
	background: #0b1530;
	border-bottom: 1px solid #263558;
}

.vm-logo {
	display: inline-flex;
	align-items: center;
	line-height: 0;
}

.vm-logo img {
	display: block;
	width: 140px;
	height: auto;
}

.vm-mast-nav {
	display: flex;
	align-items: center;
	gap: 4px;
}

body.vm-body .vm-nav-link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 12px;
	color: #e8eefc;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	list-style: none;
	cursor: pointer;
	border-radius: 999px;
}

.vm-nav-link::-webkit-details-marker {
	display: none;
}

body.vm-body .vm-nav-link:hover,
.vm-menu[open] > .vm-nav-link {
	background: rgba(255, 255, 255, 0.12);
}

.vm-menu {
	position: relative;
}

.vm-menu > summary::after {
	content: '';
	margin-left: 8px;
	border: 4px solid transparent;
	border-top-color: currentcolor;
	border-bottom: 0;
}

.vm-menu-list {
	position: absolute;
	right: 0;
	top: calc(100% + 6px);
	z-index: 50;
	min-width: 230px;
	max-height: 70vh;
	margin: 0;
	padding: 8px;
	overflow-y: auto;
	list-style: none;
	background: #0f1b3a;
	border: 1px solid #2b3d68;
	border-radius: 14px;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

body.vm-body .vm-menu-list a {
	display: block;
	padding: 10px 12px;
	color: #e8eefc;
	font-size: 0.9rem;
	text-decoration: none;
	border-radius: 8px;
}

body.vm-body .vm-menu-list a:hover {
	background: rgba(61, 224, 196, 0.16);
}

/* ------------------------------------------------------------------- stage */

.vm-stage {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--vm-side-w);
	grid-template-rows: var(--vm-topbar-h) minmax(0, 1fr);
	/* Hug the map: toolbar + the map at the width it gets (viewport minus sidebar and padding), never taller than the viewport. */
	height: min(calc(100vh - var(--vm-mast-h)), calc(var(--vm-topbar-h) + (100vw - var(--vm-side-w) - 28px) * 0.487));
	height: min(calc(100svh - var(--vm-mast-h)), calc(var(--vm-topbar-h) + (100vw - var(--vm-side-w) - 28px) * 0.487));
	overflow: hidden;
	background: var(--vm-bg);
}

.vm-topbar {
	grid-column: 1;
	grid-row: 1;
	position: relative;
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	min-width: 0;
	padding: 0 20px;
}

.vm-heading {
	min-width: 0;
}

.vm-title {
	margin: 0;
	color: var(--vm-ink);
	font: 700 28px / 1.1 var(--vm-serif);
	letter-spacing: -0.015em;
}

.vm-live {
	margin: 4px 0 0;
	overflow: hidden;
	color: var(--vm-dim);
	font-size: 13.5px;
	line-height: 1.3;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.vm-controls {
	display: flex;
	flex: none;
	align-items: center;
	gap: 10px;
	min-width: 0;
	min-height: 40px;
}

/* --------------------------------------------------------------------- map */

.vm-map-wrap {
	grid-column: 1;
	grid-row: 2;
	position: relative;
	min-height: 0;
	overflow: hidden;
	padding: 0 14px;
	background: var(--vm-bg);
	touch-action: pan-y;
}

.vm-map {
	display: block;
	width: 100%;
	height: 100%;
	-webkit-user-select: none;
	user-select: none;
	cursor: grab;
}

.vm-sphere {
	fill: var(--vm-sea);
	stroke: var(--vm-line);
	stroke-width: 1;
	vector-effect: non-scaling-stroke;
}

.vm-land path {
	fill: var(--vm-land);
	stroke: none;
}

.vm-land-hi path {
	fill: var(--vm-land);
	stroke: var(--vm-coast);
	stroke-width: 0.5;
	stroke-linejoin: round;
	vector-effect: non-scaling-stroke;
}

.vm-land-hi .vm-borders {
	fill: none;
	stroke: var(--vm-coast);
	stroke-opacity: 0.55;
	stroke-width: 0.5;
	vector-effect: non-scaling-stroke;
}

.vm-plates,
.vm-act,
.vm-sel,
.vm-dots {
	pointer-events: none;
}

.vm-map:not(.is-plates) .vm-plates {
	display: none;
}

.vm-map.is-plates .vm-plates {
	display: inline;
}

.vm-plates-all {
	fill: none;
	stroke: var(--vm-plate);
	stroke-width: 1;
	vector-effect: non-scaling-stroke;
}

.vm-ring {
	fill: none;
	stroke: var(--vm-ring);
	stroke-width: 2.5;
	stroke-linecap: round;
	stroke-linejoin: round;
	vector-effect: non-scaling-stroke;
}

.vm-ring-label {
	fill: var(--vm-ring);
	font: 700 13px var(--vm-sans);
	letter-spacing: 0.04em;
	text-anchor: middle;
	paint-order: stroke;
	stroke: var(--vm-sea);
	stroke-width: 3px;
}

.vm-d {
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
	vector-effect: non-scaling-stroke;
}

.vm-d2 {
	stroke: var(--vm-d2);
	stroke-width: 4px;
}

.vm-d1 {
	stroke: var(--vm-d1);
	stroke-width: 5.5px;
}

.vm-dots-fallback {
	stroke: none;
}

.vm-dots-fallback.vm-d2 {
	fill: var(--vm-d2);
}

.vm-dots-fallback.vm-d1 {
	fill: var(--vm-d1);
}

/* Active markers stay a constant pixel size: the script sets --vm-u (viewBox units per CSS px). */
.vm-m {
	transform: translate(calc(var(--x) * 1px), calc(var(--y) * 1px)) scale(var(--vm-u, 1));
}

.vm-core {
	fill: var(--vm-act);
	stroke: var(--vm-surface);
	stroke-width: 1.5px;
}

.vm-halo {
	fill: var(--vm-halo);
	opacity: 0.5;
	transform-box: fill-box;
	transform-origin: center;
	animation: vm-pulse 2.6s ease-out infinite;
	animation-delay: calc(var(--x) * -11ms);
}

@keyframes vm-pulse {
	0% {
		opacity: 0.55;
		transform: scale(1);
	}

	100% {
		opacity: 0;
		transform: scale(3.4);
	}
}

@media (prefers-reduced-motion: reduce) {
	.vm-halo {
		opacity: 0.28;
		transform: scale(2);
		animation: none;
	}
}

/* ----------------------------------------------------------- legend, zoom */

.vm-legend {
	position: absolute;
	left: 14px;
	bottom: calc(14px + var(--vm-adh, 0px));
	z-index: 5;
	padding: 8px 12px;
	color: var(--vm-ink);
	font-size: 12.5px;
	line-height: 1.3;
	background: var(--vm-surface);
	border: 1px solid var(--vm-line);
	border-radius: 10px;
}

.vm-legend ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.vm-legend li {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 2px 0;
}

.vm-sw {
	position: relative;
	flex: none;
	width: 14px;
	height: 14px;
}

.vm-sw::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 50%;
	border-radius: 50%;
	transform: translate(-50%, -50%);
}

.vm-sw-act::before {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--vm-halo);
	border-radius: 50%;
	opacity: 0.35;
}

.vm-sw-act::after {
	width: 9px;
	height: 9px;
	background: var(--vm-act);
	box-shadow: 0 0 0 1.5px var(--vm-surface);
}

.vm-sw-1::after {
	width: 5.5px;
	height: 5.5px;
	background: var(--vm-d1);
}

.vm-sw-2::after {
	width: 4px;
	height: 4px;
	background: var(--vm-d2);
}

.vm-zoom {
	position: absolute;
	right: 14px;
	bottom: calc(14px + var(--vm-adh, 0px));
	z-index: 5;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.vm-zbtn {
	width: 40px;
	height: 40px;
	padding: 0;
	color: var(--vm-ink);
	font-size: 20px;
	line-height: 1;
	background: var(--vm-surface);
	border: 1px solid var(--vm-line);
	border-radius: 10px;
	cursor: pointer;
}

.vm-zbtn:hover {
	background: var(--vm-surface2);
}

.vm-zbtn:disabled {
	opacity: 0.4;
	cursor: default;
}

.vm-zreset {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.vm-hint {
	position: absolute;
	left: 50%;
	top: 14px;
	z-index: 6;
	margin: 0;
	padding: 8px 14px;
	color: var(--vm-surface);
	font-size: 13px;
	background: var(--vm-ink);
	border-radius: 999px;
	transform: translateX(-50%);
	pointer-events: none;
}

.vm-tip {
	position: absolute;
	left: 0;
	top: 0;
	z-index: 7;
	padding: 6px 10px;
	color: var(--vm-surface);
	font-size: 13px;
	line-height: 1.3;
	white-space: nowrap;
	background: var(--vm-ink);
	border-radius: 8px;
	transform: translate(-50%, -135%);
	pointer-events: none;
}

/* ----------------------------------------------------------------- sidebar */

.vm-side {
	grid-column: 2;
	grid-row: 1 / -1;
	position: relative;
	z-index: 10;
	min-height: 0;
	padding: 0 22px calc(28px + var(--vm-adh, 0px));
	overflow-x: hidden;
	overflow-y: auto;
	background: var(--vm-surface);
	border-left: 1px solid var(--vm-line);
	scrollbar-width: thin;
}

.vm-grip {
	display: none;
}

.vm-card {
	padding-top: 22px;
}

.vm-kicker {
	margin: 0 0 4px;
	color: var(--vm-accent);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.vm-period {
	margin: 0;
	color: var(--vm-dim);
	font-size: 13.5px;
	line-height: 1.4;
}

.vm-act-list {
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
}

.vm-act-list li {
	border-bottom: 1px solid var(--vm-line);
}

.vm-act-list a {
	display: flex;
	align-items: baseline;
	gap: 4px 8px;
	margin: 0 -8px;
	padding: 9px 8px;
	color: var(--vm-ink);
	text-decoration: none;
	border-radius: 8px;
}

.vm-act-list a:hover {
	background: var(--vm-surface2);
}

.vm-act-name {
	order: 1;
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.3;
}

.vm-new {
	order: 2;
	padding: 1px 6px;
	color: var(--vm-act);
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	border: 1px solid currentcolor;
	border-radius: 999px;
}

.vm-act-country {
	order: 3;
	margin-left: auto;
	color: var(--vm-dim);
	font-size: 13px;
	line-height: 1.3;
	text-align: right;
}

.vm-report-link {
	display: inline-block;
	margin-top: 14px;
	color: var(--vm-link);
	font-size: 14px;
	font-weight: 600;
}

.vm-empty {
	margin: 10px 0 0;
	color: var(--vm-dim);
	font-size: 14.5px;
}

.vm-card-note {
	margin: 16px 0 0;
	color: var(--vm-dim);
	font-size: 13px;
	line-height: 1.5;
}

/* --------------------------------------------------------------- controls */

.vm-search {
	position: relative;
	width: 320px;
	max-width: 100%;
}

.vm-search::before {
	content: '';
	position: absolute;
	left: 14px;
	top: 12px;
	width: 10px;
	height: 10px;
	border: 2px solid var(--vm-dim);
	border-radius: 50%;
	pointer-events: none;
}

.vm-search::after {
	content: '';
	position: absolute;
	left: 25px;
	top: 25px;
	width: 6px;
	height: 2px;
	background: var(--vm-dim);
	border-radius: 1px;
	transform: rotate(45deg);
	pointer-events: none;
}

.vm-search input {
	width: 100%;
	height: 40px;
	margin: 0;
	padding: 0 14px 0 38px;
	font-size: 15px;
	background: var(--vm-surface);
	border: 1px solid var(--vm-line);
	border-radius: 20px;
	-webkit-appearance: none;
	appearance: none;
}

.vm-search input::placeholder {
	color: var(--vm-dim);
	opacity: 1;
}

#vm-search-list {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 6px);
	z-index: 30;
	max-height: 340px;
	margin: 0;
	padding: 6px;
	overflow-y: auto;
	list-style: none;
	background: var(--vm-surface);
	border: 1px solid var(--vm-line);
	border-radius: 12px;
	box-shadow: var(--vm-shadow);
}

#vm-search-list li {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	padding: 9px 10px;
	font-size: 14.5px;
	border-radius: 8px;
	cursor: pointer;
}

#vm-search-list li[aria-selected='true'],
#vm-search-list li:hover {
	background: var(--vm-surface2);
}

#vm-search-list li[role='presentation'] {
	color: var(--vm-dim);
	cursor: default;
}

.vm-toggle {
	flex: none;
	height: 40px;
	padding: 0 16px;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	background: var(--vm-surface);
	border: 1px solid var(--vm-line);
	border-radius: 20px;
	cursor: pointer;
}

.vm-toggle:hover {
	background: var(--vm-surface2);
}

.vm-toggle[aria-pressed='true'] {
	color: var(--vm-on-ring);
	background: var(--vm-ring);
	border-color: var(--vm-ring);
}

/* ui:start */
/* Dynamic interface: map input states, selection ring, search results, card states, sheet extras. Source: dev/ui-block.css, merged by dev/merge-ui.js. */

/* map input */
.vm-map-wrap:not(.is-zoomed) .vm-map {
	cursor: default;
}

.vm-map-wrap.is-zoomed {
	touch-action: none;
}

.vm-map-wrap.is-dragging .vm-map {
	cursor: grabbing;
}

.vm-map-wrap.is-hit .vm-map {
	cursor: pointer;
}

.vm-map:focus-visible {
	outline: 2px solid var(--vm-ink);
	outline-offset: -4px;
}

.vm-zbtn[aria-disabled='true'] {
	opacity: 0.4;
	cursor: default;
}

.vm-hint.is-on {
	animation: vm-fade-in 0.2s ease-out;
}

@keyframes vm-fade-in {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

/* the Ring of Fire label keeps its pixel size at every zoom */
.vm-ring-label {
	font-size: calc(13px * var(--vm-u, 1));
	stroke-width: calc(3px * var(--vm-u, 1));
}

/* selection */
.vm-sel-bg,
.vm-sel-ring {
	fill: none;
	transform: translate(calc(var(--x) * 1px), calc(var(--y) * 1px)) scale(var(--vm-u, 1));
}

.vm-sel-bg {
	stroke: var(--vm-sea);
	stroke-width: 5px;
}

.vm-sel-ring {
	stroke: var(--vm-ink);
	stroke-width: 2.5px;
}

.vm-m.is-sel .vm-halo {
	opacity: 0;
	animation: none;
}

/* search results */
.vm-opt-t {
	min-width: 0;
	font-weight: 600;
	overflow-wrap: anywhere;
}

.vm-opt-s {
	flex: none;
	color: var(--vm-dim);
	font-size: 12.5px;
	text-align: right;
}

#vm-search-list .vm-lb-msg {
	display: block;
	font-size: 14px;
	line-height: 1.4;
}

.vm-search input:focus-visible {
	outline-offset: 0;
}

/* card */
.vm-card-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.vm-card-title {
	min-width: 0;
}

.vm-name {
	margin: 0;
	color: var(--vm-ink);
	font: 700 24px / 1.15 var(--vm-serif);
	letter-spacing: -0.01em;
	overflow-wrap: anywhere;
}

.vm-kicker.vm-st-act {
	color: var(--vm-act);
}

.vm-kicker.vm-st-1 {
	color: var(--vm-d1);
}

.vm-kicker.vm-st-2 {
	color: var(--vm-dim);
}

.vm-x {
	display: grid;
	flex: none;
	place-items: center;
	width: 40px;
	height: 40px;
	margin: -8px -10px 0 0;
	padding: 0;
	color: var(--vm-dim);
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

.vm-x:hover {
	color: var(--vm-ink);
	background: var(--vm-surface2);
}

.vm-where {
	margin: 12px 0 0;
	font-size: 14.5px;
}

.vm-where a,
.vm-links a,
.vm-where-post a {
	color: var(--vm-link);
	font-weight: 600;
}

.vm-where-post {
	margin: 4px 0 0;
	font-size: 13.5px;
}

.vm-facts {
	margin: 14px 0 0;
	padding: 0;
}

.vm-fact {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 9px 0;
	font-size: 14px;
	line-height: 1.35;
	border-bottom: 1px solid var(--vm-line);
}

.vm-fact dt {
	flex: none;
	color: var(--vm-dim);
}

.vm-fact dd {
	margin: 0;
	font-weight: 600;
	text-align: right;
}

.vm-flags {
	display: grid;
	gap: 6px;
	margin-top: 14px;
}

.vm-flag {
	margin: 0;
	color: var(--vm-dim);
	font-size: 13.5px;
	line-height: 1.4;
}

.vm-flag-act {
	color: var(--vm-ink);
}

.vm-links {
	margin: 16px 0 0;
	font-size: 14px;
}

.vm-count,
.vm-count-act {
	margin: 10px 0 0;
	font-size: 14.5px;
}

.vm-count-act {
	margin-top: 2px;
	color: var(--vm-act);
	font-weight: 600;
}

.vm-note-text {
	margin: 12px 0 0;
	font-size: 14.5px;
	line-height: 1.55;
}

.vm-vol-list {
	margin: 14px 0 0;
	padding: 0;
	list-style: none;
}

.vm-vbtn {
	display: flex;
	align-items: center;
	gap: 10px;
	width: calc(100% + 16px);
	min-height: 40px;
	margin: 0 -8px;
	padding: 8px;
	font-size: 14.5px;
	text-align: left;
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--vm-line);
	cursor: pointer;
}

.vm-vbtn:hover {
	background: var(--vm-surface2);
}

.vm-vbtn-n {
	min-width: 0;
	overflow-wrap: anywhere;
}

.vm-vbtn-s {
	margin-left: auto;
	color: var(--vm-act);
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.vm-grip:focus-visible {
	outline-offset: -4px;
}

@media (max-width: 480px) {
	#vm-search-list li {
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
	}

	.vm-opt-s {
		text-align: left;
	}

	.vm-name {
		font-size: 22px;
	}
}

@media (max-width: 899.98px) {
	.vm-vbtn {
		min-height: 44px;
	}

	/* The expanded sheet covers the top bar; a focused search stays above the sheet so its results stay visible. */
	.vm-js .vm-side {
		z-index: 25;
	}

	.vm-topbar:focus-within {
		z-index: 35;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vm-hint.is-on {
		animation: none;
	}
}
/* ui:end */

/* ------------------------------------------------------ narrow desktop, tablet */

@media (max-width: 1199.98px) {
	:root {
		--vm-topbar-h: 112px;
	}

	.vm-topbar {
		flex-wrap: wrap;
		align-content: center;
		padding: 0 16px;
	}

	.vm-heading {
		flex: 1 1 100%;
	}

	.vm-controls {
		flex: 1 1 100%;
	}

	.vm-search {
		flex: 1 1 auto;
		width: auto;
		max-width: 360px;
	}
}

/* ---------------------------------------------------- phone: map + bottom sheet */

@media (max-width: 899.98px) {
	.vm-d2 {
		stroke-width: 3.5px;
	}

	.vm-d1 {
		stroke-width: 5px;
	}

	.vm-title {
		font-size: 24px;
	}

	.vm-mast {
		padding: 0 14px;
	}

	/* Map row = the world at full width (aspect 1000:487) plus a band below it for the legend and zoom buttons, then a row the height of the sheet's peek; the sheet floats over rows 1-3 and slides up over the map. */
	.vm-stage {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: var(--vm-topbar-h) calc((100vw - 12px) * 0.487 + 84px) var(--vm-peek);
		height: auto;
		min-height: 0;
	}

	.vm-topbar {
		padding: 0 14px;
	}

	.vm-map-wrap {
		padding: 0 6px;
	}

	.vm-legend {
		left: 10px;
		bottom: 10px;
		padding: 6px 10px;
		font-size: 12px;
	}

	.vm-zoom {
		right: 10px;
		bottom: 10px;
		flex-direction: row;
	}

	.vm-js .vm-side {
		--vm-vis: var(--vm-peek);
		grid-column: 1;
		position: absolute;
		left: 0;
		right: 0;
		bottom: var(--vm-adh, 0px);
		height: calc(100% - 8px);
		padding: 0 18px 24px;
		border-left: 0;
		border-radius: 18px 18px 0 0;
		box-shadow: 0 -8px 30px rgba(15, 27, 56, 0.18);
		transform: translateY(calc(100% - var(--vm-vis)));
		transition: transform 0.34s cubic-bezier(0.2, 0.85, 0.25, 1);
		overscroll-behavior: contain;
	}

	.vm-js .vm-side.is-drag {
		transition: none;
	}

	.vm-js .vm-side[data-snap='peek'] {
		overflow-y: hidden;
		touch-action: none;
	}

	.vm-js .vm-side[data-snap='full'] {
		transform: none;
	}

	.vm-js .vm-grip {
		position: sticky;
		top: 0;
		z-index: 2;
		display: block;
		height: 28px;
		margin: 0 -18px;
		cursor: grab;
		touch-action: none;
		background: var(--vm-surface);
	}

	.vm-js .vm-grip::after {
		content: '';
		position: absolute;
		left: 50%;
		top: 10px;
		width: 44px;
		height: 5px;
		margin-left: -22px;
		background: var(--vm-line);
		border-radius: 3px;
	}

	.vm-js .vm-card {
		padding-top: 4px;
	}

	.vm-act-list li {
		min-height: 44px;
	}

	.vm-act-list a {
		min-height: 44px;
		align-items: center;
	}

	@media (prefers-reduced-motion: reduce) {
		.vm-js .vm-side {
			transition: none;
		}
	}
}

@media (max-width: 899.98px) {
	html:not(.vm-js) .vm-stage {
		display: block;
		height: auto;
		min-height: 0;
		overflow: visible;
	}

	html:not(.vm-js) .vm-map-wrap {
		height: auto;
		margin-bottom: 0;
		aspect-ratio: 1000 / 487;
	}

	html:not(.vm-js) .vm-side {
		border-top: 1px solid var(--vm-line);
	}
}

/* 16px keeps iOS from zooming the page on focus; the placeholder and the toggle are sized so both controls fit a 360px row. */
@media (max-width: 480px) {
	.vm-search input {
		padding-left: 34px;
		font-size: 16px;
		text-overflow: ellipsis;
	}

	.vm-search input::placeholder {
		font-size: 14px;
	}

	.vm-search::before {
		left: 12px;
	}

	.vm-search::after {
		left: 23px;
	}

	.vm-toggle {
		padding: 0 11px;
		font-size: 13px;
	}
}

/* ------------------------------------------------------ without scripts, embed */

html:not(.vm-js) [data-needs-js],
html:not(.vm-js) .vm-controls {
	display: none;
}

body.vm-embed {
	--vm-mast-h: 0px;
}

.vm-embed .vm-stage {
	min-height: 0;
}
