html,
body,
#map {
	width: 100%;
	height: 100%;
	margin: 0;
}

body {
	font: 14px/1.4 system-ui, sans-serif;
}

#map {
	position: absolute;
	inset: 0;
}

#address-search {
	position: absolute;
	z-index: 1000;
	top: 10px;
	left: 58px;
	width: min(360px, calc(100vw - 90px));
}

#address-input {
	box-sizing: border-box;
	width: 100%;
	padding: 9px 11px;
	border: 1px solid #999;
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
	font: inherit;
}

#address-results {
	position: absolute;
	top: calc(100% + 4px);
	right: 0;
	left: 0;
	display: none;
	max-height: 50vh;
	overflow-y: auto;
	margin: 0;
	padding: 0;
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
	list-style: none;
}

#address-results li + li {
	border-top: 1px solid #eee;
}

#address-results button {
	display: block;
	width: 100%;
	padding: 9px 11px;
	border: 0;
	background: transparent;
	color: #222;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

#address-results button:hover,
#address-results button.active {
	background: #e8f1fa;
}

#address-status {
	margin-top: 4px;
	padding: 0 8px;
	color: #444;
	font-size: 12px;
}

#address-status:empty {
	display: none;
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	clip-path: inset(50%);
}

#year-control {
	position: absolute;
	z-index: 1000;
	right: 16px;
	bottom: 16px;
	left: 16px;
	padding: 10px 14px 8px;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.95);
	box-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}

.year-heading,
.year-range {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.year-heading {
	font-weight: 600;
}

.invalid-toggle {
	font-weight: 400;
	white-space: nowrap;
}

#year-slider {
	display: block;
	width: 100%;
	height: 20px;
	margin: 8px 0 0;
	appearance: none;
	background: transparent;
}

#year-slider::-webkit-slider-runnable-track {
	height: 8px;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 5px;
	background: var(--year-gradient, linear-gradient(to right, red, orange, yellow, green, blue));
}

#year-slider::-moz-range-track {
	height: 8px;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 5px;
	background: var(--year-gradient, linear-gradient(to right, red, orange, yellow, green, blue));
}

#year-slider::-webkit-slider-thumb {
	width: 18px;
	height: 18px;
	margin-top: -6px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: var(--year-color, #e53935);
	box-shadow: 0 0 2px rgba(0, 0, 0, 0.7);
	appearance: none;
}

#year-slider::-moz-range-thumb {
	width: 14px;
	height: 14px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: var(--year-color, #e53935);
	box-shadow: 0 0 2px rgba(0, 0, 0, 0.7);
}

#timeline-controls {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin-top: 6px;
}

.timeline-button {
	min-height: 32px;
	padding: 4px 8px;
	border: 1px solid #aaa;
	border-radius: 4px;
	background: #fff;
	color: #222;
	font: inherit;
	cursor: pointer;
}

.timeline-button:hover:not(:disabled) {
	background: #e8f1fa;
}

.timeline-button:disabled {
	color: #999;
	cursor: default;
}

.timeline-play {
	min-width: 88px;
}

#timeline-speed {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 6px;
	color: #444;
	font-size: 12px;
}

#year-speed {
	padding: 4px 6px;
	border: 1px solid #aaa;
	border-radius: 4px;
	background: #fff;
	color: #222;
	font: inherit;
}

.year-range,
#status {
	color: #555;
	font-size: 12px;
}

#status {
	margin-top: 4px;
}

.building-popup dl {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 3px 10px;
	margin: 0 0 8px;
}

.building-popup dt {
	font-weight: 600;
}

.building-popup dd {
	margin: 0;
}

.building-popup a,
.oblique-control a {
	color: #1769aa;
}

.oblique-control {
	background: #fff;
	padding: 0;
}

.oblique-control a {
	display: block;
	width: 38px;
	height: 38px;
	padding: 0;
	font-size: 28px;
	line-height: 38px;
	text-align: center;
	text-decoration: none;
}

@media (max-width: 520px) {
	#year-control {
		right: 8px;
		bottom: 8px;
		left: 8px;
		padding: 8px 10px;
	}

	.year-heading {
		align-items: flex-start;
		flex-direction: column;
		gap: 2px;
	}
}
