/**
 * The map, its controls, and everything drawn on it.
 *
 * @package FirstHand
 */

.fh__map {
	position: absolute;
	inset: 0;
}

.fh__map-missing {
	display: grid;
	place-content: center;
	justify-items: center;
	gap: 6px;
	height: 100%;
	padding: 24px;
	text-align: center;
}

.fh__map-missing-title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: var(--fh-ink-2);
}

.fh__map-missing-note {
	margin: 0;
	max-width: 42ch;
	color: var(--fh-ink-3);
}

/*
 * The map's controls live in the top bar, beside the event they belong to.
 * Relative, so the Map menu can hang from exactly here.
 */
.fh__map-tools {
	position: relative;
	display: flex;
	gap: 8px;
	align-items: center;
}

/* Overhead / 3D / Street. One control, three attitudes of the same map. */

.fh__map-modes {
	display: inline-flex;
	padding: 3px;
	background: var(--fh-glass);
	border: 1px solid var(--fh-line-2);
	border-radius: 999px;
	backdrop-filter: blur(6px);
}

.fh__mode {
	padding: 5px 14px;
	background: none;
	border: 0;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	color: var(--fh-ink-3);
}

.fh__mode.is-active {
	background: var(--fh-ink);
	color: var(--fh-bg);
}

/* Cameras ------------------------------------------------------------- */

/*
 * No `position` here, and none on any other marker class.
 *
 * Mapbox's own stylesheet makes every marker `position: absolute` at the map
 * origin and then places it with a transform. This rule loads after Mapbox's
 * at the same specificity, so `position: relative` here WON — every pin fell
 * into normal block flow, stacked 26px apart, and the transform offset each
 * one from its flow position instead of the origin. Camera N sat ~26·N px
 * below its true coordinate while its cone, drawn by the GPU, did not.
 * The ▶ glyph inside still positions against the button: absolute is a
 * containing block too.
 */
.fh__cam {
	width: 26px;
	height: 26px;
	display: grid;
	place-items: center;
	padding: 0;
	background: var(--fh-known);
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
	/*
	 * NEVER set transform or transition transform on a marker element.
	 * Mapbox positions markers through that property; a transition here
	 * makes the dot animate towards each new screen position, so it lags
	 * the map on every pan and drifts away from its own cone.
	 */
	transition: box-shadow 0.14s ease, background-color 0.14s ease;
}

.fh__cam:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 0 5px rgba(224, 138, 30, 0.35);
}

.fh__cam.is-selected {
	background: var(--fh-accent);
	width: 32px;
	height: 32px;
	z-index: 3;
}

/*
 * A camera outside the current moment stays on the map, dimmed. Removing it
 * would hide that the angle exists at all; this says "not now, but real".
 */
.fh__cam.is-past {
	opacity: 0.42;
}

.fh__cam-dot {
	width: 7px;
	height: 7px;
	background: #fff;
	border-radius: 50%;
}

.fh__cam-kind {
	position: absolute;
	font-size: 11px;
	color: #fff;
}

.fh__site {
	width: 20px;
	height: 20px;
	background: var(--fh-alert);
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 0 0 8px rgba(194, 69, 45, 0.22);
}

.fh__beacon {
	width: 14px;
	height: 14px;
	padding: 0;
	background: var(--fh-accent);
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.fh__beacon:hover {
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.55), 0 0 0 6px rgba(224, 138, 30, 0.35);
}

/* View From Here ------------------------------------------------------ */

.fh__ground {
	position: absolute;
	inset: 0;
	z-index: 50;
	display: flex;
	flex-direction: column;
	background: var(--fh-bg);
}

.fh__ground-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	background: var(--fh-bg-2);
	border-bottom: 1px solid var(--fh-line);
}

.fh__ground-title {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 600;
}

.fh__ground-stage {
	position: relative;
	display: flex;
	flex: 1;
	min-height: 0;
}

.fh__ground-pano {
	flex: 1;
	min-width: 0;
	display: grid;
	place-items: center;
}

/*
 * The photograph sits beside the panorama rather than behind a tab. Comparing
 * the two is the entire reason for standing here.
 */
.fh__ground-shot {
	position: relative;
	width: 34%;
	min-width: 240px;
	max-width: 460px;
	border-left: 1px solid var(--fh-line);
	background: #000;
	display: grid;
	place-items: center;
}

.fh__ground-shot img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.fh__ground-shot-label {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 3px 9px;
	background: var(--fh-glass-2);
	border-radius: 999px;
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--fh-ink-2);
}

.fh__ground-note {
	max-width: 40ch;
	padding: 24px;
	text-align: center;
	color: var(--fh-ink-3);
}

@media (max-width: 820px) {
	.fh__ground-stage { flex-direction: column; }
	.fh__ground-shot { width: auto; max-width: none; height: 34%; border-left: 0; border-top: 1px solid var(--fh-line); }
}

/* Map settings: basemap, buildings, fog ------------------------------- */

/*
 * Hangs from the map controls it belongs to, in the top bar.
 */
.fh__mapset-panel {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	right: auto;
	z-index: 40;
	width: 236px;
	display: grid;
	gap: 12px;
	padding: 13px;
	background: var(--fh-glass);
	border: 1px solid var(--fh-line-2);
	border-radius: var(--fh-radius-lg);
	box-shadow: var(--fh-shadow);
	backdrop-filter: blur(8px);
}

/* The key: swatches that echo the pins, drawn here in their own classes. */
.fh__mapset-row--key {
	align-items: flex-start;
}

.fh__key {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 5px;
	font-size: 11.5px;
	color: var(--fh-ink-2);
}

.fh__key li {
	display: flex;
	align-items: center;
	gap: 8px;
}

.fh__key-swatch {
	flex: none;
	width: 14px;
	height: 14px;
	box-sizing: border-box;
	border: 2px solid #fff;
	border-radius: 50%;
	background: var(--fh-known);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.fh__key-swatch.is-confirmed {
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4), 0 0 0 2px var(--fh-known);
}

.fh__key-swatch.is-fair {
	background: color-mix(in srgb, var(--fh-known) 60%, var(--fh-bg));
}

.fh__key-swatch.is-weak {
	background: var(--fh-bg-2);
	border-color: var(--fh-known);
	border-style: dashed;
}

.fh__key-swatch.is-future {
	opacity: 0.3;
}

.fh__key-swatch.is-subject {
	width: 11px;
	height: 11px;
	margin: 0 1.5px;
	border-radius: 2px;
	background: var(--fh-alert);
	transform: rotate(45deg);
}

.fh__key-swatch.is-site {
	background: var(--fh-alert);
	box-shadow: 0 0 0 3px rgba(194, 69, 45, 0.25);
}

.fh__key-swatch.is-landmark {
	border-radius: 0;
	background: var(--fh-good);
}

/* A glance at a pin. */
.fh__hover {
	position: absolute;
	z-index: 6;
	width: 240px;
	padding: 7px 9px;
	background: var(--fh-glass);
	border: 1px solid var(--fh-line);
	border-radius: var(--fh-radius);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
	pointer-events: none;
	font-size: 11.5px;
	line-height: 1.35;
	color: var(--fh-ink-2);
}

.fh__hover-title {
	display: block;
	color: var(--fh-ink);
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* The job's own steps, while it runs. */
.fh__steps {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 6;
	max-width: min(420px, 70%);
	padding: 6px 10px;
	background: var(--fh-glass);
	border: 1px solid var(--fh-line);
	border-radius: var(--fh-radius);
	font-size: 12px;
	line-height: 1.4;
	color: var(--fh-ink);
}

.fh__steps-past {
	display: block;
	font-size: 11px;
	color: var(--fh-ink-3);
}

.fh__steps-now::before {
	content: '';
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-right: 6px;
	border-radius: 50%;
	background: var(--fh-accent);
	animation: fh-pulse 1s ease-in-out infinite;
}

@keyframes fh-pulse {
	50% { opacity: 0.35; }
}

/* The shortcuts card and its ? button. */
.fh__keys-btn {
	bottom: 156px;
}

.fh__keys {
	position: absolute;
	right: 56px;
	bottom: 24px;
	z-index: 7;
	width: 320px;
	max-width: calc(100% - 72px);
	padding: 12px 14px;
	background: var(--fh-glass);
	border: 1px solid var(--fh-line);
	border-radius: var(--fh-radius-lg);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
	font-size: 12px;
	color: var(--fh-ink-2);
}

.fh__keys-title {
	margin: 0 0 6px;
	font-size: 10.5px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--fh-ink-3);
}

.fh__keys-list {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 5px 12px;
	margin: 0 0 12px;
}

.fh__keys-list dt,
.fh__keys-list dd {
	margin: 0;
}

.fh__keys kbd {
	display: inline-block;
	min-width: 1.6em;
	padding: 1px 6px;
	border: 1px solid var(--fh-line-2);
	border-bottom-width: 2px;
	border-radius: 4px;
	background: var(--fh-bg-3);
	font: inherit;
	font-size: 11px;
	text-align: center;
	color: var(--fh-ink);
}

.fh__keys-mouse {
	margin: 0 0 12px;
	padding-left: 16px;
	display: grid;
	gap: 4px;
}

.fh__mapset-row {
	display: grid;
	gap: 5px;
}

.fh__mapset-label {
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--fh-ink-3);
}

.fh__mapset-seg {
	display: flex;
	padding: 2px;
	background: var(--fh-bg);
	border: 1px solid var(--fh-line);
	border-radius: var(--fh-radius);
}

.fh__mapset-seg-btn {
	flex: 1;
	padding: 5px 8px;
	background: none;
	border: 0;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 500;
	color: var(--fh-ink-3);
}

.fh__mapset-seg-btn.is-active {
	background: var(--fh-ink);
	color: var(--fh-bg);
	font-weight: 600;
}

.fh__mapset-check {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 13px;
	color: var(--fh-ink-2);
	cursor: pointer;
}

/* A brief word over the map, after something finished. */

.fh__say {
	position: absolute;
	left: 50%;
	bottom: calc(var(--fh-time) + var(--fh-strip) + 16px);
	transform: translateX(-50%);
	z-index: 30;
	max-width: 46ch;
	padding: 10px 16px;
	background: var(--fh-glass);
	border: 1px solid var(--fh-accent);
	border-radius: 999px;
	color: var(--fh-ink);
	font-size: 13px;
	text-align: center;
	box-shadow: var(--fh-shadow);
}

@media (max-width: 820px) {
	.fh__say {
		left: 12px;
		right: 12px;
		bottom: 16px;
		max-width: none;
		transform: none;
		border-radius: var(--fh-radius-lg);
	}
}

/* Subjects and corrections ------------------------------------------- */

/*
 * What one camera was looking at. Square, so it never reads as another
 * camera, and tied to its cone by the sight line between them.
 */
/*
 * The diamond is an inner element on purpose. The outer button is what
 * Mapbox positions, so it cannot carry a transform of our own — rotating
 * it would either be ignored or throw the marker off its coordinates.
 */
.fh__subj {
	width: 16px;
	height: 16px;
	padding: 0;
	display: grid;
	place-items: center;
	background: none;
	border: 0;
	cursor: grab;
}

.fh__subj-mark {
	width: 11px;
	height: 11px;
	background: var(--fh-alert);
	border: 2px solid #fff;
	border-radius: 2px;
	transform: rotate(45deg);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
	transition: transform 0.14s ease;
}

.fh__subj:hover .fh__subj-mark {
	transform: rotate(45deg) scale(1.25);
}

.fh__subj.is-selected {
	width: 22px;
	height: 22px;
	z-index: 3;
}

.fh__subj.is-selected .fh__subj-mark {
	width: 15px;
	height: 15px;
	background: var(--fh-accent);
}

.fh__subj:active,
.fh__cam:active {
	cursor: grabbing;
}

/* A camera holding an unsaved move: clearly not what is on record yet. */
.fh__cam.is-moved {
	border-style: dashed;
	border-color: var(--fh-accent);
}

.fh__subj.is-moved .fh__subj-mark {
	border-style: dashed;
	border-color: var(--fh-accent);
}

/*
 * The correction bar. In the stage rather than the panel, because the panel
 * can be closed and a correction you cannot commit is worse than none.
 */
.fh__place {
	position: absolute;
	left: 50%;
	top: 14px;
	transform: translateX(-50%);
	z-index: 32;
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 8px 10px 8px 16px;
	background: var(--fh-glass);
	border: 1px solid var(--fh-accent);
	border-radius: 999px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.fh__place-what {
	color: var(--fh-ink);
	font-size: 13px;
	white-space: nowrap;
}

.fh__place-acts {
	display: flex;
	gap: 6px;
}

@media (max-width: 720px) {
	.fh__place {
		left: 12px;
		right: 12px;
		transform: none;
		flex-wrap: wrap;
		border-radius: 14px;
	}

	.fh__place-what {
		white-space: normal;
	}
}

/* A subject nobody has given yet: hollow, and clearly there to be picked up. */
.fh__subj.is-ghost .fh__subj-mark {
	background: transparent;
	border: 2px dashed var(--fh-ink-2);
	box-shadow: none;
}

.fh__subj.is-ghost.is-selected .fh__subj-mark {
	border-color: var(--fh-accent);
}

/* A camera whose moment has not come yet. Present, so the scene reads; faint, so it has not happened. */
.fh__cam.is-future {
	opacity: 0.22;
}

/* Where you stood in Street View. The arrow is a child; the marker carries no transform. */
.fh__stand {
	width: 34px;
	height: 34px;
	padding: 0;
	display: grid;
	place-items: center;
	background: none;
	border: 0;
	cursor: pointer;
}

.fh__stand-dot {
	grid-area: 1 / 1;
	width: 14px;
	height: 14px;
	background: #5ec8ea;
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 0 0 6px rgba(94, 200, 234, 0.28), 0 2px 8px rgba(0, 0, 0, 0.5);
}

.fh__stand-arrow {
	grid-area: 1 / 1;
	width: 0;
	height: 0;
	border-left: 7px solid transparent;
	border-right: 7px solid transparent;
	border-bottom: 16px solid #5ec8ea;
	transform-origin: 50% 100%;
	translate: 0 -15px;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}

/* The whole scene, beside the zoom buttons. Not a marker: a fixed corner control. */
.fh__fit {
	position: absolute;
	right: 10px;
	bottom: 132px;
	z-index: 5;
	width: 29px;
	height: 29px;
	padding: 0;
	background: #fff;
	border: 0;
	border-radius: 4px;
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
	color: #333;
	font-size: 18px;
	line-height: 1;
}

.fh__fit:hover {
	background: #f2f2f2;
}

/* The map's attitude, beside its controls. */
.fh__attitude {
	padding: 5px 10px;
	background: none;
	border: 1px solid transparent;
	border-radius: 999px;
	font-family: var(--fh-mono);
	font-size: 11.5px;
	font-variant-numeric: tabular-nums;
	color: var(--fh-ink-2);
	white-space: nowrap;
}

.fh__attitude:hover {
	border-color: var(--fh-line-2);
	color: var(--fh-ink);
}

.fh__mapset-view {
	font-family: var(--fh-mono);
	font-size: 12px;
	font-variant-numeric: tabular-nums;
	color: var(--fh-ink);
}

@media (max-width: 1100px) {
	.fh__attitude {
		display: none;
	}
}

/* Trust, on the pin: confirmed solid, weak hollow. ------------------- */
.fh__cam.is-confirmed {
	border-width: 3px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 0 2px var(--fh-known);
}

.fh__cam.is-fair {
	background: color-mix(in srgb, var(--fh-known) 60%, var(--fh-bg));
}

.fh__cam.is-weak {
	background: var(--fh-bg-2);
	border-color: var(--fh-known);
	border-style: dashed;
}

.fh__cam.is-weak .fh__cam-dot {
	background: var(--fh-known);
}

.fh__cam.is-selected.is-weak,
.fh__cam.is-selected.is-fair {
	background: var(--fh-accent);
	border-style: solid;
	border-color: #fff;
}

.fh__site {
	padding: 0;
	cursor: pointer;
}

/* Landmarks: a named fixed point. No position or transform here — Mapbox owns those. */
.fh__landmark {
	display: grid;
	justify-items: center;
	gap: 2px;
	padding: 0;
	background: none;
	border: 0;
	cursor: grab;
}

.fh__landmark-mark {
	width: 10px;
	height: 10px;
	background: var(--fh-good);
	border: 2px solid #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.fh__landmark.is-confirmed .fh__landmark-mark {
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5), 0 0 0 2px var(--fh-good);
}

.fh__landmark-label {
	max-width: 120px;
	padding: 1px 5px;
	background: var(--fh-glass);
	border-radius: 3px;
	font-size: 11px;
	line-height: 1.3;
	color: var(--fh-ink);
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Playback on the map: a rolling clip, a picture firing ---------------- */

.fh__cam.is-live {
	box-shadow: 0 0 0 4px rgba(224, 138, 30, 0.35), 0 2px 8px rgba(0, 0, 0, 0.5);
	animation: fh-cam-live 1.6s ease-in-out infinite;
}

.fh__cam.is-firing {
	animation: fh-cam-fire 0.9s ease-out 1;
}

@keyframes fh-cam-live {
	0%, 100% { box-shadow: 0 0 0 3px rgba(224, 138, 30, 0.25), 0 2px 8px rgba(0, 0, 0, 0.5); }
	50%      { box-shadow: 0 0 0 7px rgba(224, 138, 30, 0.45), 0 2px 8px rgba(0, 0, 0, 0.5); }
}

@keyframes fh-cam-fire {
	0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.9), 0 2px 8px rgba(0, 0, 0, 0.5); filter: brightness(2); }
	100% { box-shadow: 0 0 0 16px rgba(255, 255, 255, 0), 0 2px 8px rgba(0, 0, 0, 0.5); filter: none; }
}

@media (prefers-reduced-motion: reduce) {
	.fh__cam.is-live,
	.fh__cam.is-firing { animation: none; }
}

/* Historical Compare ---------------------------------------------------- */

.fh__compare-menu-anchor {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.fh__mode--compare {
	margin-left: 4px;
}

/* Same visual grammar as the Map menu: a small tool menu under its button. */
.fh__compare-menu-anchor .fh__compare {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	bottom: auto;
	z-index: 48;
	width: 356px;
	max-width: min(356px, calc(100vw - 28px));
	display: grid;
	gap: 11px;
	padding: 13px;
	background: var(--fh-glass);
	border: 1px solid var(--fh-line-2);
	border-radius: var(--fh-radius-lg);
	box-shadow: var(--fh-shadow);
	backdrop-filter: blur(8px);
	font-size: 12px;
	color: var(--fh-ink);
}

.fh__compare-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.fh__compare-title {
	font-size: 12px;
	font-weight: 700;
	color: var(--fh-ink);
}

.fh__compare-close {
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--fh-ink-2);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.fh__compare-close:hover { background: var(--fh-paper-2); color: var(--fh-ink); }

.fh__compare-pair {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 10px;
}

.fh__compare-card {
	display: grid;
	gap: 5px;
	min-width: 0;
}

.fh__compare-card-label {
	font-family: var(--fh-mono);
	font-size: 9.5px;
	letter-spacing: .09em;
	color: var(--fh-ink-3);
}

.fh__compare-date-nav {
	display: grid;
	grid-template-columns: 26px minmax(0, 1fr) 26px;
	align-items: stretch;
	border: 1px solid var(--fh-line);
	border-radius: 7px;
	overflow: hidden;
	background: var(--fh-paper);
}

.fh__compare-arrow,
.fh__compare-date {
	min-height: 32px;
	border: 0;
	background: transparent;
	color: var(--fh-ink);
	font: inherit;
	cursor: pointer;
}

.fh__compare-arrow {
	font-size: 18px;
	color: var(--fh-ink-2);
}

.fh__compare-arrow:hover,
.fh__compare-date:hover:not(:disabled) { background: var(--fh-paper-2); }

.fh__compare-date {
	padding: 0 4px;
	border-left: 1px solid var(--fh-line);
	border-right: 1px solid var(--fh-line);
	font-weight: 700;
	font-size: 11px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.fh__compare-date:disabled { cursor: default; color: var(--fh-ink-3); }

.fh__compare-view {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2px;
	padding: 2px;
	border-radius: 8px;
	background: var(--fh-paper-2);
}

.fh__compare-view .fh__seg {
	justify-content: center;
}

.fh__compare-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: flex-start;
}

.fh__compare-swipe-hint {
	margin-top: -4px;
	font-size: 10.5px;
	color: var(--fh-ink-3);
}

.fh__compare-offsets {
	display: grid;
	gap: 2px;
	font-size: 10.5px;
	color: var(--fh-ink-2);
}

.fh__compare-view--small {
	grid-template-columns: repeat(3, 1fr);
	max-width: 180px;
}

.fh__compare-view--four {
	grid-template-columns: repeat(4, 1fr);
}

.fh__compare-more {
	border-top: 1px solid var(--fh-line);
	padding-top: 8px;
}

.fh__compare-more-summary {
	cursor: pointer;
	font-size: 11px;
	font-weight: 700;
	color: var(--fh-ink-2);
	list-style: none;
}

.fh__compare-more-summary::-webkit-details-marker { display: none; }
.fh__compare-more-summary::after { content: '›'; float: right; font-size: 15px; line-height: 1; transition: transform .15s ease; }
.fh__compare-more[open] .fh__compare-more-summary::after { transform: rotate(90deg); }

.fh__compare-more-body {
	display: grid;
	gap: 8px;
	padding-top: 9px;
}

.fh__compare-checks {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
}

.fh__compare-check {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.fh__compare-note {
	margin: 0;
	font-size: 10.5px;
	line-height: 1.4;
	color: var(--fh-ink-3);
}

.fh__compare-align {
	position: fixed;
	top: 154px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10050;
	width: 340px;
	max-width: calc(100vw - 28px);
	display: grid;
	gap: 10px;
	padding: 14px;
	border: 1px solid var(--fh-line-2);
	border-radius: var(--fh-radius-lg);
	background: var(--fh-glass);
	backdrop-filter: blur(8px);
	box-shadow: var(--fh-shadow);
}

.fh__compare-align-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.fh__compare-align-note {
	margin: 0;
	font-size: 11px;
	line-height: 1.45;
	color: var(--fh-ink-2);
}

.fh__compare-align-reference {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 8px;
	background: var(--fh-paper-2);
}

.fh__compare-align-reference strong {
	font-size: 11px;
}

.fh__compare-align-step {
	display: grid;
	gap: 6px;
}

.fh__compare-align-pad {
	display: grid;
	justify-items: center;
	gap: 8px;
}

.fh__compare-align-middle {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	width: 100%;
}

.fh__compare-align-arrow {
	min-height: 36px;
	padding: 0 10px;
	border: 1px solid var(--fh-line);
	border-radius: 10px;
	background: var(--fh-paper);
	color: var(--fh-ink);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.fh__compare-align-arrow:hover {
	background: var(--fh-paper-2);
}

.fh__compare-align-reset {
	font-size: 11px;
}

.fh__compare-align-status {
	font-size: 11px;
	font-weight: 700;
	color: var(--fh-ink);
}

.fh__compare-align-opacity {
	display: grid;
	gap: 6px;
}

.fh__compare-align-opacity-readout {
	font-size: 11px;
	color: var(--fh-ink-2);
}

.fh__compare-align-foot {
	display: flex;
	justify-content: flex-end;
}

/* Swipe: the companion pane and the divider */

.fh__compare-pane {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 5;
	clip-path: inset(0 0 0 50%);
}

.fh__compare-pane .mapboxgl-canvas {
	pointer-events: none;
}

.fh__compare-divider {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 2px;
	margin-left: -1px;
	background: var(--fh-accent);
	z-index: 6;
	cursor: ew-resize;
	touch-action: none;
}

.fh__compare-grip {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	padding: 4px 8px;
	border-radius: 999px;
	background: var(--fh-accent);
	color: #fff;
	font-size: 12px;
	line-height: 1;
	white-space: nowrap;
	box-shadow: var(--fh-shadow);
}

/* Overlays hidden while comparing */

.fh__map-slot.is-hide-cameras .fh__cam,
.fh__map-slot.is-hide-cameras .fh__stand {
	display: none;
}

.fh__map-slot.is-hide-subjects .fh__subj,
.fh__map-slot.is-hide-subjects .fh__subject {
	display: none;
}

/* In historical compare, subjects are rendered as a geographic Mapbox layer so
 * they stay locked to the map and can be mirrored into the Swipe companion. */
.fh__map-slot.is-compare-mode .fh__subj,
.fh__map-slot.is-compare-mode .fh__subject {
	display: none;
}

/* When the lower workbench is collapsed, map messages can sit near the edge. */
.fh__workspace.is-lower-dock-collapsed .fh__say {
	bottom: 42px;
}

/* GPT16 — the Map menu belongs to the Map button, not the whole tool row. */
.fh__map-menu-anchor {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.fh__map-menu-button {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.fh__map-menu-button .fh__icon {
	width: 13px;
	height: 13px;
}

.fh__compare-menu-button.is-active {
	background: var(--fh-paper-2);
	border-color: var(--fh-line-2);
}

.fh__map-menu-anchor .fh__mapset-panel {
	left: 0;
	right: auto;
	min-width: 250px;
}

.fh__mapset-more {
	border-top: 1px solid var(--fh-line);
	padding-top: 8px;
}

.fh__mapset-summary {
	cursor: pointer;
	font-size: 11px;
	font-weight: 700;
	color: var(--fh-ink-2);
	list-style: none;
}

.fh__mapset-summary::-webkit-details-marker { display: none; }
.fh__mapset-summary::after {
	content: '›';
	float: right;
	font-size: 15px;
	line-height: 1;
	transition: transform .15s ease;
}
.fh__mapset-more[open] .fh__mapset-summary::after { transform: rotate(90deg); }

.fh__mapset-more-body {
	display: grid;
	gap: 12px;
	padding-top: 10px;
}


/* GPT18 — Swipe changes imagery only. Mapbox HTML markers are shared UI and
 * must stay above the companion After map instead of disappearing at divider. */
.fh__map-slot .mapboxgl-marker:has(.fh__cam),
.fh__map-slot .mapboxgl-marker:has(.fh__subj),
.fh__map-slot .mapboxgl-marker:has(.fh__site),
.fh__map-slot .mapboxgl-marker:has(.fh__landmark),
.fh__map-slot .mapboxgl-marker:has(.fh__stand) {
	z-index: 9 !important;
}

.fh__compare-divider { z-index: 8; }

/* Historical Compare can hide camera markers while retaining fixed subjects. */
.fh__map-slot.is-hide-subjects .fh__subj { display: none; }



/* GPT31 — Historical compare is a short, wide, map-first control bar. */
.fh__compare-menu-anchor .fh__compare {
	width: min(760px, calc(100vw - 360px));
	max-width: min(760px, calc(100vw - 28px));
	min-width: 610px;
	gap: 7px;
	padding: 8px 9px;
	border-radius: 10px;
}

.fh__compare-bar {
	display: flex;
	align-items: center;
	gap: 7px;
	min-height: 32px;
}

.fh__compare-view--primary {
	display: inline-grid;
	grid-template-columns: repeat(4, minmax(74px, 1fr));
	flex: 1 1 390px;
	max-width: 440px;
	padding: 2px;
}

.fh__compare-view--primary .fh__seg {
	min-height: 29px;
}

.fh__compare-adjust-button {
	min-width: 72px;
	margin-left: 2px;
}

.fh__compare-bar > .fh__compare-close {
	margin-left: auto;
	flex: 0 0 auto;
}

.fh__compare-meta-row {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 30px;
	padding-top: 6px;
	border-top: 1px solid var(--fh-line);
	white-space: nowrap;
}

.fh__compare-date-compact {
	display: inline-grid;
	grid-template-columns: auto 22px minmax(72px, 92px) 22px;
	align-items: center;
	border: 1px solid var(--fh-line);
	border-radius: 7px;
	overflow: hidden;
	background: var(--fh-paper);
}

.fh__compare-date-compact-label {
	padding: 0 7px;
	font-size: 9.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--fh-ink-3);
}

.fh__compare-date-compact .fh__compare-arrow,
.fh__compare-date-compact .fh__compare-date {
	min-height: 27px;
}

.fh__compare-date-compact .fh__compare-arrow {
	font-size: 15px;
	padding: 0;
}

.fh__compare-date-compact .fh__compare-date {
	font-size: 10.5px;
	padding: 0 4px;
}

.fh__compare-swipe-hint,
.fh__compare-view-label {
	margin: 0;
	font-size: 11px;
	color: var(--fh-ink-3);
}

.fh__compare-offsets--inline {
	display: flex;
	gap: 6px;
	margin-left: auto;
	font-size: 9.5px;
}

.fh__compare-more--inline {
	position: relative;
	margin-left: auto;
	padding: 0;
	border: 0;
}

.fh__compare-offsets--inline + .fh__compare-more--inline {
	margin-left: 0;
}

.fh__compare-more--inline .fh__compare-more-summary {
	padding: 5px 7px;
	border-radius: 6px;
}

.fh__compare-more--inline .fh__compare-more-summary:hover {
	background: var(--fh-paper-2);
}

.fh__compare-more--inline .fh__compare-more-summary::after {
	margin-left: 5px;
}

.fh__compare-more--inline .fh__compare-more-body {
	position: absolute;
	top: calc(100% + 7px);
	right: 0;
	z-index: 4;
	width: 255px;
	padding: 10px;
	border: 1px solid var(--fh-line-2);
	border-radius: 9px;
	background: var(--fh-glass);
	box-shadow: var(--fh-shadow);
	backdrop-filter: blur(8px);
}

/* Alignment expands the same anchored bar instead of opening a modal. */
.fh__compare-bar--align {
	gap: 10px;
}

.fh__compare-align-title {
	display: grid;
	gap: 1px;
	min-width: 112px;
}

.fh__compare-align-title strong {
	font-size: 11px;
}

.fh__compare-align-title span,
.fh__compare-inline-label {
	font-size: 9.5px;
	color: var(--fh-ink-3);
}

.fh__compare-align-target,
.fh__compare-align-step-compact,
.fh__compare-nudges {
	display: inline-flex;
	align-items: center;
	gap: 3px;
}

.fh__compare-align-target .fh__seg,
.fh__compare-align-step-compact .fh__seg,
.fh__compare-nudge {
	min-height: 28px;
	padding: 0 9px;
	border: 1px solid var(--fh-line);
	border-radius: 6px;
	background: var(--fh-paper);
	color: var(--fh-ink);
	font: inherit;
	font-size: 10.5px;
	cursor: pointer;
}

.fh__compare-align-target .fh__seg.is-active,
.fh__compare-align-step-compact .fh__seg.is-active {
	background: var(--fh-ink);
	color: var(--fh-paper);
	border-color: var(--fh-ink);
}

.fh__compare-align-opacity--inline {
	display: flex;
	align-items: center;
	gap: 5px;
	min-width: 150px;
	margin-left: auto;
}

.fh__compare-align-opacity--inline input {
	width: 82px;
}

.fh__compare-align-strip {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 32px;
	padding-top: 6px;
	border-top: 1px solid var(--fh-line);
}

.fh__compare-align-reference-compact {
	display: inline-flex;
	align-items: baseline;
	gap: 5px;
	padding: 0;
	background: transparent;
}

.fh__compare-align-reference-compact strong {
	font-size: 10.5px;
}

.fh__compare-align-reading {
	display: grid;
	gap: 1px;
	min-width: 185px;
	margin-left: auto;
}

.fh__compare-align-reading strong {
	font-size: 10.5px;
}

.fh__compare-align-reading span {
	font-size: 11px;
	color: var(--fh-ink-3);
}

.fh__compare-nudge {
	width: 29px;
	padding: 0;
	font-size: 14px;
	font-weight: 700;
}

@media (max-width: 900px) {
	.fh__compare-menu-anchor .fh__compare {
		min-width: 0;
		width: min(640px, calc(100vw - 28px));
	}

	.fh__compare-meta-row,
	.fh__compare-align-strip {
		flex-wrap: wrap;
	}

	.fh__compare-align-reading {
		margin-left: 0;
	}
}


/* GPT34 — historical imagery consistency note. */
.fh__compare-resolution-note {
	display: inline-flex;
	align-items: center;
	min-height: 22px;
	padding: 0 7px;
	border: 1px solid var(--fh-line);
	border-radius: 999px;
	background: var(--fh-paper);
	color: var(--fh-ink-3);
	font-size: 11px;
	white-space: nowrap;
	cursor: help;
}

@media (max-width: 980px) {
	.fh__compare-resolution-note {
		display: none;
	}
}

/* GPT35 — compact, honest historical compare controls. */
.fh__compare-menu-anchor .fh__compare {
	width: min(860px, calc(100vw - 390px));
	max-width: calc(100vw - 28px);
	min-width: 680px;
	gap: 5px;
	padding: 8px 9px;
	overflow: visible;
}

.fh__compare-bar--single {
	display: flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
}

.fh__compare-view--dated {
	display: grid;
	grid-template-columns: 78px minmax(150px, 1fr) minmax(150px, 1fr) 86px;
	flex: 1 1 auto;
	max-width: none;
	min-width: 0;
}

.fh__compare-view--dated .fh__seg {
	min-width: 0;
	padding: 0 9px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.fh__compare-adjust-button {
	flex: 0 0 auto;
	min-width: 70px;
}

.fh__compare-options {
	position: relative;
	flex: 0 0 auto;
	margin: 0;
	padding: 0;
	border: 0;
}

.fh__compare-options .fh__compare-more-summary {
	display: inline-flex;
	align-items: center;
	min-height: 30px;
	padding: 0 9px;
	border: 1px solid var(--fh-line);
	border-radius: 6px;
	background: var(--fh-paper);
	white-space: nowrap;
	cursor: pointer;
}

.fh__compare-options .fh__compare-more-body {
	position: absolute;
	top: calc(100% + 7px);
	right: 0;
	z-index: 80;
	width: min(280px, calc(100vw - 40px));
	padding: 10px;
	border: 1px solid var(--fh-line-2);
	border-radius: 9px;
	background: var(--fh-glass);
	box-shadow: var(--fh-shadow);
	backdrop-filter: blur(8px);
	white-space: normal;
}

.fh__compare-status-row {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 18px;
	padding: 1px 3px 0;
	font-size: 9.5px;
	color: var(--fh-ink-3);
	white-space: nowrap;
}

.fh__compare-offset-summary {
	margin-left: auto;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Alignment stays in this same panel and uses a literal directional pad. */
.fh__compare-bar--align {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.fh__compare-align-title {
	flex: 0 0 auto;
	min-width: 118px;
}

.fh__compare-align-target {
	display: flex;
	align-items: center;
	gap: 4px;
	min-width: 0;
	flex: 1 1 auto;
}

.fh__compare-align-target .fh__seg {
	min-height: 29px;
	padding: 0 9px;
	white-space: nowrap;
}

.fh__compare-align-opacity--inline {
	flex: 0 0 175px;
	min-width: 0;
	margin-left: 0;
}

.fh__compare-align-strip {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 58px;
	padding-top: 7px;
	border-top: 1px solid var(--fh-line);
}

.fh__compare-direction-pad {
	display: grid;
	grid-template-columns: repeat(3, 28px);
	grid-template-rows: repeat(3, 24px);
	gap: 2px;
	align-items: center;
	justify-items: center;
	flex: 0 0 auto;
}

.fh__compare-direction-pad .fh__compare-nudge {
	width: 28px;
	height: 24px;
	min-height: 24px;
	padding: 0;
	border: 1px solid var(--fh-line);
	border-radius: 5px;
	background: var(--fh-paper);
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
}

.fh__compare-direction-pad .fh__compare-nudge:hover {
	border-color: var(--fh-accent);
	background: var(--fh-paper-2);
}

.fh__compare-pad-center {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 24px;
	font-size: 8px;
	color: var(--fh-ink-3);
	text-transform: uppercase;
	letter-spacing: .04em;
}

.fh__compare-pad-spacer {
	width: 28px;
	height: 24px;
}

.fh__compare-align-reading {
	min-width: 250px;
	max-width: 330px;
	margin-left: 0;
}

@media (max-width: 1050px) {
	.fh__compare-menu-anchor .fh__compare {
		width: min(760px, calc(100vw - 28px));
		min-width: 0;
	}

	.fh__compare-view--dated {
		grid-template-columns: 70px minmax(125px, 1fr) minmax(125px, 1fr) 78px;
	}

	.fh__compare-status-row {
		flex-wrap: wrap;
	}

	.fh__compare-align-strip {
		flex-wrap: wrap;
	}
}


/* GPT36 — simple always-visible historical overlay options. */
.fh__compare-options-row {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 26px;
	padding: 4px 3px 0;
	border-top: 1px solid var(--fh-line);
	font-size: 9.5px;
	color: var(--fh-ink-3);
	white-space: nowrap;
}

.fh__compare-checks--inline {
	flex: 0 0 auto;
	gap: 5px 10px;
}

.fh__compare-checks--inline .fh__compare-check {
	font-size: 11px;
	color: var(--fh-ink-2);
}

.fh__compare-options-row .fh__compare-offset-summary {
	margin-left: auto;
}

@media (max-width: 900px) {
	.fh__compare-options-row {
		flex-wrap: wrap;
		white-space: normal;
	}

	.fh__compare-options-row .fh__compare-offset-summary {
		margin-left: 0;
	}
}



/* GPT38 — Swipe labels are independent map overlays anchored to the divider.
 * Keeping them out of the 2px divider fixes the browser laying the vertical text
 * at the top of the line instead of at the bottom of the map. */
.fh__compare-side-badge {
	position: absolute !important;
	bottom: 42px !important;
	top: auto !important;
	z-index: 8;
	display: block;
	box-sizing: border-box;
	padding: 8px 6px;
	border: 1px solid rgba(255,255,255,.34);
	border-radius: 7px;
	background: rgba(20,24,28,.76);
	color: #fff;
	box-shadow: 0 2px 10px rgba(0,0,0,.26);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	line-height: 1.15;
	text-transform: uppercase;
	white-space: nowrap;
	writing-mode: vertical-rl;
	text-orientation: mixed;
	pointer-events: none;
	user-select: none;
}

.fh__compare-side-badge[hidden] {
	display: none !important;
}

.fh__compare-side-badge--before {
	transform: translateX(calc(-100% - 9px));
}

.fh__compare-side-badge--after {
	transform: translateX(9px);
}

.fh__compare-side-badge-kind,
.fh__compare-side-badge-date {
	display: inline;
}

.fh__compare-side-badge-kind::after {
	content: " · ";
}

.fh__compare-side-badge-date {
	font-weight: 500;
	opacity: .92;
}

@media (max-height: 700px) {
	.fh__compare-side-badge {
		bottom: 32px !important;
		font-size: 8px;
		padding: 7px 5px;
	}
}

/* GPT41 — same investigation window on the map. */
.fh__cam.is-outside-window,
.fh__subj.is-outside-window {
	opacity: var(--fh-outside-opacity, .2) !important;
}

.fh__cam.is-outside-window:hover,
.fh__cam.is-outside-window.is-selected,
.fh__subj.is-outside-window:hover,
.fh__subj.is-outside-window.is-selected {
	opacity: max(.72, var(--fh-outside-opacity, .2)) !important;
}

/* GPT44 — temporary Ask reference pins ------------------------------- */
.fh__reference-pin {
	position: relative;
	width: 24px;
	height: 24px;
	color: var(--fh-ink);
	font: 10px/1.25 var(--fh-font);
	pointer-events: auto;
}

.fh__reference-pin-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	flex: 0 0 24px;
	border: 2px solid var(--fh-accent);
	border-radius: 50%;
	background: var(--fh-bg);
	box-shadow: 0 2px 7px rgba(0,0,0,.28);
	font-weight: 800;
}

.fh__reference-pin-card {
	position: absolute;
	left: 30px;
	bottom: 0;
	display: grid;
	gap: 2px;
	min-width: 120px;
	max-width: 200px;
	padding: 6px 7px;
	border: 1px solid var(--fh-line-2, var(--fh-line));
	border-radius: 7px;
	background: var(--fh-glass);
	box-shadow: var(--fh-shadow);
	backdrop-filter: blur(6px);
}

.fh__reference-pin-label {
	font-size: 10.5px;
	font-weight: 650;
}

.fh__reference-pin-meta {
	color: var(--fh-ink-3);
	font-size: 11px;
}

.fh__reference-pin-acts {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-top: 2px;
}

.fh__reference-pin-use,
.fh__reference-pin-save,
.fh__reference-pin-close {
	border: 0;
	border-radius: 5px;
	background: var(--fh-bg-3);
	color: var(--fh-ink-2);
	font: inherit;
	font-size: 11px;
	cursor: pointer;
}

.fh__reference-pin-use,
.fh__reference-pin-save { padding: 3px 6px; }
.fh__reference-pin-use { border-color: var(--fh-accent); color: var(--fh-accent); }
.fh__reference-pin-close { width: 20px; height: 20px; padding: 0; margin-left: auto; font-size: 14px; line-height: 1; }
.fh__reference-pin-use:hover,
.fh__reference-pin-save:hover,
.fh__reference-pin-close:hover { color: var(--fh-ink); background: var(--fh-bg-2); }
