@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Serif+Display&display=swap");

:root {
	color-scheme: dark;
	--atlas-ink: #f4f6fb;
	--atlas-muted: #a4b2c4;
	--atlas-paper: #111f31;
	--atlas-line: rgba(163, 187, 217, 0.16);
	--atlas-teal: #2b79f7;
	--atlas-teal-dark: #1b65d8;
	--atlas-coral: #57c9de;
	--atlas-shadow: 0 18px 48px rgba(2, 8, 18, 0.46), 0 2px 8px rgba(2, 8, 18, 0.3);
	--atlas-motion: 180ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

html,
body,
button,
input,
select,
textarea {
	font-family: "DM Sans", "Avenir Next", "Segoe UI", sans-serif;
}

body,
.app {
	color: var(--atlas-ink);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.app {
	background-color: #0c1928;
}

.app h1,
.app h2,
.app h3,
.panel h2,
.window h2 {
	font-family: "DM Serif Display", Georgia, serif;
	font-weight: 600;
}

.app button {
	color: inherit;
	font: inherit;
	-webkit-tap-highlight-color: transparent;
}

.app button:focus-visible,
.app input:focus-visible,
.app summary:focus-visible,
.app label:focus-within {
	outline: 3px solid rgba(22, 121, 111, 0.38);
	outline-offset: 2px;
}

.shadow,
.panel.shadow,
.window.shadow,
.controls.shadow,
.bar.shadow,
#qrcode.shadow {
	box-shadow: var(--atlas-shadow);
}

.controls.bar.vert {
	display: flex;
	flex-direction: column;
	gap: 4px;
	width: max-content;
	padding: 6px;
	border: 1px solid rgba(255, 255, 255, 0.72);
	border-radius: 8px;
	background: rgba(251, 252, 249, 0.92);
	-webkit-backdrop-filter: blur(14px) saturate(135%);
	backdrop-filter: blur(14px) saturate(135%);
}

.controls.bar.vert > li {
	float: none;
}

.controls.bar.vert > li > button {
	display: grid;
	width: 40px;
	height: 40px;
	place-items: center;
	border: 1px solid transparent;
	border-radius: 6px;
	background: transparent;
	transition: background var(--atlas-motion), border-color var(--atlas-motion), transform var(--atlas-motion);
}

.controls.bar.vert > li > button:hover,
.controls.bar.vert > li > button:focus-visible {
	border-color: var(--atlas-line);
	background: #eaf3ef;
	transform: translateY(-1px);
}

.controls.bar.vert > li > button:active {
	transform: scale(0.95);
}

.controls.bar.vert img {
	width: 22px;
	height: 22px;
	object-fit: contain;
}

.hint,
.compare-hint {
	border: 1px solid var(--atlas-line);
	border-radius: 6px;
	background: var(--atlas-paper);
	box-shadow: var(--atlas-shadow);
	color: var(--atlas-ink);
	font-size: 13px;
	line-height: 1.45;
}

.hint .arrow {
	color: var(--atlas-paper);
}

.panel,
.window,
#qrcode {
	border: 1px solid rgba(255, 255, 255, 0.78);
	border-radius: 8px;
	background: rgba(251, 252, 249, 0.97);
	box-shadow: var(--atlas-shadow);
	-webkit-backdrop-filter: blur(16px) saturate(125%);
	backdrop-filter: blur(16px) saturate(125%);
}

.panel > .head,
.window > h2 {
	box-sizing: border-box;
	border: 0;
	border-bottom: 1px solid var(--atlas-line);
	background: var(--atlas-paper);
	color: var(--atlas-ink);
}

.panel > .head.gradient,
.window > h2.gradient,
.color-primary.gradient {
	background: var(--atlas-paper);
	color: var(--atlas-ink);
}

.panel > .head,
.window > h2 {
	font-size: 19px;
}

.panel > .head > i,
.window > .closer {
	color: var(--atlas-muted);
	transition: color var(--atlas-motion), background var(--atlas-motion);
}

.panel > .head > i:hover,
.window > .closer:hover {
	color: var(--atlas-coral);
}

.tabs > button {
	border: 0;
	border-bottom: 1px solid var(--atlas-line);
	background: #f1f5f1;
	color: var(--atlas-muted);
	font-weight: 600;
	transition: color var(--atlas-motion), background var(--atlas-motion), box-shadow var(--atlas-motion);
}

.tabs > button:hover,
.tabs > button.active,
.tabs > button[aria-selected="true"] {
	background: var(--atlas-paper);
	color: var(--atlas-teal-dark);
}

.tabs > button.active,
.tabs > button[aria-selected="true"] {
	box-shadow: inset 0 -2px var(--atlas-teal);
}

.preset,
.layer,
.accordion .tab {
	border-bottom: 1px solid var(--atlas-line);
}

.preset > summary,
.layer > summary,
.accordion .tab > .head,
.storymap.head {
	box-sizing: border-box;
	background: transparent;
	color: var(--atlas-ink);
	transition: background var(--atlas-motion), color var(--atlas-motion);
}

.preset > summary:hover,
.layer > summary:hover,
.accordion .tab > .head:hover,
.storymap.head:hover {
	background: #edf4f0;
	color: var(--atlas-teal-dark);
}

.preset .icon img,
.layer .icon img,
.storymap .icon img {
	border: 1px solid var(--atlas-line);
	border-radius: 6px;
	object-fit: cover;
}

.preset .title,
.layer .title,
.accordion .tab .title,
.storymap .title {
	color: var(--atlas-ink);
	font-weight: 600;
}

.preset .subtitle,
.accordion .tab .subtitle {
	color: var(--atlas-muted);
}

.preset .content,
.layer .content,
.accordion .tab > .content {
	background: #f5f7f4;
	color: #435251;
	line-height: 1.55;
}

.preset .content button,
.layer .content label,
.hint button,
.docview button {
	border-radius: 5px;
	transition: color var(--atlas-motion), background var(--atlas-motion);
}

.preset .content button:hover,
.hint button:hover,
.docview button:hover {
	background: #e3efea;
	color: var(--atlas-teal-dark);
}

.search {
	border: 1px solid rgba(255, 255, 255, 0.78);
	border-radius: 8px;
	background: rgba(251, 252, 249, 0.96);
	box-shadow: var(--atlas-shadow);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
}

.search input {
	box-sizing: border-box;
	min-width: 0;
	border: 0;
	border-radius: 7px;
	background: transparent;
	color: var(--atlas-ink);
	font: inherit;
}

.search input::placeholder {
	color: #84918e;
}

.search li > button {
	color: var(--atlas-muted);
	background: transparent;
}

.search .results {
	border: 1px solid var(--atlas-line);
	border-radius: 6px;
	background: var(--atlas-paper);
	box-shadow: var(--atlas-shadow);
}

.legend.window {
	box-sizing: border-box;
	max-width: calc(100vw - 32px);
	max-height: calc(100dvh - 32px);
	overflow: hidden;
}

.legend .content {
	max-height: calc(100% - 42px);
	overflow: auto;
}

.legend table {
	border-collapse: collapse;
}

.legend tr + tr {
	border-top: 1px solid var(--atlas-line);
}

.legend td,
.legend th {
	padding: 5px 7px;
}

.story-controls {
	border: 1px solid rgba(255, 255, 255, 0.78);
	border-radius: 8px;
	background: rgba(251, 252, 249, 0.94);
	box-shadow: var(--atlas-shadow);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
}

.story-controls button {
	border-radius: 6px;
	background: transparent;
	transition: background var(--atlas-motion), transform var(--atlas-motion);
}

.story-controls button:hover {
	background: #eaf3ef;
	transform: translateY(-1px);
}

.story-title {
	color: var(--atlas-ink);
	font-weight: 600;
}

.intro.modal .content {
	box-sizing: border-box;
	max-width: calc(100vw - 32px);
	max-height: calc(100dvh - 32px);
	border: 1px solid rgba(255, 255, 255, 0.8);
	border-radius: 8px;
	background: rgba(251, 252, 249, 0.98);
	box-shadow: var(--atlas-shadow);
}

.intro.modal .logo {
	width: auto;
	max-width: min(48%, 240px);
	max-height: 42px;
	object-fit: contain;
	object-position: left center;
	vertical-align: middle;
}

.intro.modal .qr:has(img[src=""]) {
	display: none;
}

.intro.modal .closer,
.intro.modal .open-help {
	box-sizing: border-box;
	min-height: 36px;
	border-radius: 6px;
	background: #edf3ef;
	color: var(--atlas-ink);
	font-size: 14px;
	font-weight: 600;
	transition: color var(--atlas-motion), background var(--atlas-motion), transform var(--atlas-motion);
}

.intro.modal .closer:hover,
.intro.modal .open-help:hover {
	background: #dcebe4;
	color: var(--atlas-teal-dark);
}

.intro.modal .tab > .head {
	border-bottom: 1px solid var(--atlas-line);
	background: transparent;
	color: var(--atlas-ink);
	transition: background var(--atlas-motion), color var(--atlas-motion);
}

.intro.modal .tab > .head:hover {
	background: #edf4f0;
	color: var(--atlas-teal-dark);
}

.intro.modal .tab > .content {
	color: #435251;
	line-height: 1.55;
}

.help.window {
	box-sizing: border-box;
	border-radius: 8px;
}

.help.window > h2 {
	border-bottom: 1px solid var(--atlas-line);
	background: var(--atlas-paper);
	color: var(--atlas-ink);
}

.help.window > .closer,
.help.window > .maximize {
	border-radius: 6px;
	background: transparent;
	color: var(--atlas-muted);
}

.help.window > .closer:hover,
.help.window > .maximize:hover {
	background: #edf4f0;
	color: var(--atlas-teal-dark);
}

.dragview .dragger {
	width: 6px;
	border: 0;
	border-radius: 6px;
	background: var(--atlas-coral);
	box-shadow: 0 0 0 3px rgba(251, 252, 249, 0.8), 0 2px 12px rgba(29, 43, 43, 0.25);
}

#credits {
	padding: 4px 7px;
	border-radius: 4px;
	background: rgba(251, 252, 249, 0.82);
	color: var(--atlas-ink);
	font: 11px/1.35 "DM Sans", "Avenir Next", "Segoe UI", sans-serif;
}

#geoloc-marker-circle {
	box-shadow: 0 0 0 5px rgba(22, 121, 111, 0.2), 0 0 0 10px rgba(22, 121, 111, 0.09);
}

input[type="checkbox"] {
	accent-color: var(--atlas-teal);
}

::selection {
	background: var(--atlas-teal);
	color: #fff;
}

.controls.bar.vert,
.search,
.story-controls {
	border-color: var(--atlas-line);
	border-radius: 4px;
	background: rgba(13, 27, 43, 0.97);
	box-shadow: var(--atlas-shadow);
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

.controls.bar.vert > li > button {
	border-radius: 3px;
}

.controls.bar.vert > li > button:hover,
.controls.bar.vert > li > button:focus-visible,
.story-controls button:hover {
	border-color: transparent;
	background: var(--atlas-teal);
	color: #fff;
}

.controls.bar.vert > li > button:active,
.story-controls button:active {
	background: var(--atlas-teal-dark);
}

.controls.bar.vert img {
	filter: brightness(0) invert(1);
}

.panel,
.window,
#qrcode,
.intro.modal .content {
	border: 1px solid #293c53;
	border-radius: 4px;
	background: #111f31;
	box-shadow: var(--atlas-shadow);
	color: var(--atlas-ink);
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

.panel > .head,
.window > h2,
.help.window > h2 {
	border-bottom: 1px solid #2c79ef;
	background: #14253a;
	color: var(--atlas-ink);
}

.panel > .head.gradient,
.window > h2.gradient,
.color-primary.gradient {
	background: #14253a;
	color: var(--atlas-ink);
}

.panel > .head > i,
.window > .closer,
.help.window > .maximize {
	color: var(--atlas-muted);
}

.panel > .head > i:hover,
.window > .closer:hover,
.help.window > .maximize:hover {
	color: #65a2ff;
}

.tabs > button {
	border-color: var(--atlas-line);
	background: #192b40;
	color: var(--atlas-muted);
}

.tabs > button:hover,
.tabs > button.active,
.tabs > button[aria-selected="true"] {
	background: #223751;
	color: #fff;
}

.tabs > button.active,
.tabs > button[aria-selected="true"] {
	box-shadow: inset 0 -2px #5a9cff;
}

.preset,
.layer,
.accordion .tab {
	border-color: var(--atlas-line);
}

.preset > summary,
.layer > summary,
.accordion .tab > .head,
.storymap.head {
	color: var(--atlas-ink);
}

.preset > summary:hover,
.layer > summary:hover,
.accordion .tab > .head:hover,
.storymap.head:hover,
.intro.modal .tab > .head:hover {
	background: #1b3048;
	color: #75aaff;
}

.preset .subtitle,
.accordion .tab .subtitle {
	color: #a4b2c4;
}

.preset .content,
.layer .content,
.accordion .tab > .content,
.intro.modal .tab > .content {
	background: #17283c;
	color: #c3ceda;
}

.preset .content button:hover,
.hint button:hover,
.docview button:hover {
	background: #223a55;
	color: #fff;
}

.hint,
.compare-hint,
.search .results {
	border-color: var(--atlas-line);
	border-radius: 4px;
	background: #14253a;
	color: var(--atlas-ink);
}

.hint .arrow {
	color: #14253a;
}

.search input {
	color: var(--atlas-ink);
}

.search input::placeholder {
	color: #97a8bb;
}

.search li > button {
	color: var(--atlas-muted);
}

.story-title {
	color: var(--atlas-ink);
}

.intro.modal .closer,
.intro.modal .open-help {
	border: 1px solid var(--atlas-line);
	border-radius: 3px;
	background: #25384e;
	color: #f4f6fb;
}

.intro.modal .closer:hover,
.intro.modal .open-help:hover {
	background: var(--atlas-teal);
	color: #fff;
}

.intro.modal .tab > .head,
.help.window > .closer,
.help.window > .maximize {
	background: transparent;
	color: var(--atlas-ink);
}

.help.window > .closer:hover,
.help.window > .maximize:hover {
	background: #223a55;
	color: #fff;
}

.dragview .dragger {
	border-radius: 3px;
	background: var(--atlas-teal);
	box-shadow: 0 0 0 2px rgba(12, 25, 40, 0.9), 0 2px 10px rgba(2, 8, 18, 0.45);
}

#credits {
	border: 1px solid var(--atlas-line);
	border-radius: 3px;
	background: rgba(13, 27, 43, 0.92);
	color: #c6d0dc;
	text-shadow: none;
}

#geoloc-marker-circle {
	box-shadow: 0 0 0 5px rgba(43, 121, 247, 0.24), 0 0 0 10px rgba(43, 121, 247, 0.1);
}

.text-primary,
.color-primary,
.hover-text-primary:hover,
.hover-primary:hover {
	color: #65a2ff;
}

@media (max-width: 640px) {
	.controls.bar.vert {
		gap: 3px;
		padding: 5px;
	}

	.controls.bar.vert > li > button {
		width: 38px;
		height: 38px;
	}

	.controls.bar.vert img {
		width: 20px;
		height: 20px;
	}

	.search.bar {
		left: 62px !important;
		top: 12px !important;
		width: min(330px, calc(100vw - 150px));
	}

	.search li,
	.search input {
		width: 100%;
	}

	.catalog.panel,
	.docview.panel,
	.storymaps.panel,
	.help.panel {
		box-sizing: border-box;
		width: calc(100vw - 24px) !important;
		max-width: 440px;
		max-height: calc(100dvh - 24px);
	}

	.story-controls {
		max-width: calc(100vw - 124px);
	}

	.story-title {
		max-width: calc(100vw - 190px);
	}

	.intro.modal .content {
		width: calc(100vw - 32px);
		padding: 14px;
	}

	.intro.modal .logo {
		max-width: calc(100% - 132px);
		max-height: 34px;
	}

	.intro.modal .open-help {
		position: absolute;
		top: 12px;
		right: 54px;
		padding: 0 9px;
	}

	.intro.modal .closer {
		position: absolute;
		top: 12px;
		right: 12px;
		width: 34px;
		padding: 0;
	}

	.legend.window {
		left: 12px !important;
		bottom: 12px !important;
		width: min(360px, calc(100vw - 24px)) !important;
		height: min(68dvh, 540px) !important;
	}

	.compare-hint {
		left: 12px !important;
		right: 12px !important;
		top: auto !important;
		bottom: 68px !important;
		box-sizing: border-box;
		max-width: calc(100vw - 24px);
		white-space: normal;
	}

	.compare-hint p {
		margin: 0;
	}

	.compare-hint button {
		white-space: normal;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}