html,
body {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: white;
}

:root {
	--home-button-top: 40px;
	--home-button-right: auto;
	--home-button-bottom: auto;
	--home-button-left: 40px;
	--home-button-origin-x: left;
	--home-button-origin-y: top;
	--home-button-size: 55px;
	--home-button-icon-size: 27px;
	--home-button-scale: 1;
	--action-button-fade-ms: 240ms;
	--action-button-idle-scale: 0.92;
	--language-button-top: 40px;
	--language-button-right: 40px;
	--language-button-bottom: auto;
	--language-button-left: auto;
	--language-button-origin-x: right;
	--language-button-origin-y: top;
	--language-button-size: 55px;
	--language-button-font-size: 27px;
	--language-button-scale: 1;
	--copyright-button-top: auto;
	--copyright-button-right: auto;
	--copyright-button-left: 40px;
	--copyright-button-bottom: 40px;
	--copyright-button-origin-x: left;
	--copyright-button-origin-y: bottom;
	--copyright-button-size: 55px;
	--copyright-button-font-size: 36px;
	--copyright-button-scale: 1;
	--focus-drawer-active-width: 32vw;
	--focus-drawer-active-height: 30vh;
	--focus-drawer-surface-opacity: 0.96;
	--focus-drawer-border-opacity: 0.18;
	--focus-drawer-transition-ms: 320ms;
	--focus-drawer-active-padding-top: 164px;
	--focus-drawer-active-padding-right: 28px;
	--focus-drawer-active-padding-bottom: 28px;
	--focus-drawer-active-padding-left: 28px;
	--focus-drawer-active-title-size: 55px;
	--focus-drawer-active-body-size: 35px;
	--focus-drawer-eyebrow-size: 13px;
}

body {
	overscroll-behavior: none;
}

#museumCanvas {
	display: block;
	width: 100vw;
	height: 100vh;
	background: white;

	touch-action: none;
}

#idlePromptOverlay {
	position: fixed;
	inset: 0;

	display: flex;
	align-items: center;
	justify-content: center;

	--idle-prompt-overlay-opacity: 0.3;
	background: rgba(255, 255, 255, var(--idle-prompt-overlay-opacity));
	opacity: 0;
	transition: opacity 280ms ease;
	pointer-events: none;
	z-index: 16;
}

#idlePromptOverlay.is-visible {
	opacity: 1;
}

#idlePromptImage {
	width: min(54vw, 420px);
	max-width: calc(100vw - 64px);
	height: auto;
	object-fit: contain;
	animation: idlePromptBounce 2.4s ease-in-out infinite;
	filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.14));
	will-change: transform;
	--idle-prompt-offset-x: 0px;
	--idle-prompt-offset-y: 0px;
	--idle-prompt-scale: 1;
	--idle-prompt-rotation: 0deg;
}

@font-face {
	font-family: 'SofiaRegular';
	src: url('fonts/SofiaSans/SofiaSansCondensed-Regular.ttf')
		format('truetype');
	font-weight: normal;
	font-style: normal;
}

@font-face {
	font-family: 'SofiaLight';
	src: url('fonts/SofiaSans/SofiaSansCondensed-Light.ttf') format('truetype');
	font-weight: normal;
	font-style: normal;
}

@font-face {
	font-family: 'RobotoRegular';
	src: url('fonts/RobotoMono/RobotoMono-Light.ttf') format('truetype');
	font-weight: normal;
	font-style: normal;
}

#homeButton {
	position: fixed;
	top: var(--home-button-top);
	right: var(--home-button-right);
	bottom: var(--home-button-bottom);
	left: var(--home-button-left);
	width: var(--home-button-size);
	height: var(--home-button-size);
	padding: 0;

	border-radius: 50%;
	border: none;
	background: #be1a1a;
	color: white;

	display: flex;
	align-items: center;
	justify-content: center;

	box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
	cursor: pointer;
	z-index: 20;
	touch-action: manipulation;
	transform-origin: var(--home-button-origin-x) var(--home-button-origin-y);
	transform: scale(var(--home-button-scale));
	transition:
		opacity var(--action-button-fade-ms) ease,
		transform var(--action-button-fade-ms) ease;
}

#homeButtonIcon {
	width: var(--home-button-icon-size);
	height: var(--home-button-icon-size);
	fill: currentColor;
}

#homeButton:active {
	transform: scale(calc(var(--home-button-scale) * 0.96));
}

#languageButton {
	position: fixed;
	top: var(--language-button-top);
	right: var(--language-button-right);
	bottom: var(--language-button-bottom);
	left: var(--language-button-left);
	width: var(--language-button-size);
	height: var(--language-button-size);
	padding: 0;

	border-radius: 50%;
	border: none;
	background: #be1a1a;
	color: white;

	display: flex;
	align-items: center;
	justify-content: center;

	font-family: SofiaLight, Arial, sans-serif;
	font-size: var(--language-button-font-size);
	font-weight: bold;
	letter-spacing: 0.04em;
	line-height: 1;

	box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
	cursor: pointer;
	z-index: 20;
	touch-action: manipulation;
	transform-origin: var(--language-button-origin-x)
		var(--language-button-origin-y);
	transform: scale(var(--language-button-scale));
	transition:
		opacity var(--action-button-fade-ms) ease,
		transform var(--action-button-fade-ms) ease;
}

#languageButton:active {
	transform: scale(calc(var(--language-button-scale) * 0.96));
}

#focusDrawer {
	position: fixed;
	right: 0;
	top: 0;
	height: 100vh;
	width: var(--focus-drawer-active-width);

	background: rgba(255, 255, 255, var(--focus-drawer-surface-opacity));
	border-left: 2px solid rgba(190, 26, 26, var(--focus-drawer-border-opacity));
	box-shadow: -16px 0 40px rgba(0, 0, 0, 0.12);
	backdrop-filter: blur(12px);

	transform: translateX(102%);
	transition:
		transform var(--focus-drawer-transition-ms) ease,
		opacity var(--focus-drawer-transition-ms) ease;
	opacity: 0;
	pointer-events: none;
	z-index: 18;
}

#focusDrawer.is-open {
	transform: translateX(0);
	opacity: 1;
	pointer-events: auto;
}

#focusDrawer[data-mode='mobile'] {
	top: auto;
	bottom: 0;
	right: 0;
	width: 100vw;
	height: var(--focus-drawer-active-height);
	border-left: none;
	border-top: 2px solid rgba(190, 26, 26, var(--focus-drawer-border-opacity));
	box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.12);
	transform: translateY(102%);
}

#focusDrawer[data-mode='mobile'].is-open {
	transform: translateY(0);
}

.focusDrawerInner {
	padding:
		var(--focus-drawer-active-padding-top)
		var(--focus-drawer-active-padding-right)
		var(--focus-drawer-active-padding-bottom)
		var(--focus-drawer-active-padding-left);
	font-family: SofiaLight, Arial, sans-serif;
	color: #333;
}

#focusDrawerTitle {
	margin: 0 0 16px 0;
	font-size: var(--focus-drawer-active-title-size);
	line-height: 1.05;
	color: #111;
}

#focusDrawerDescription {
	margin: 0;
	font-size: var(--focus-drawer-active-body-size);
	line-height: 1.5;
}

#copyrightButton {
	position: fixed;
	top: var(--copyright-button-top);
	right: var(--copyright-button-right);
	left: var(--copyright-button-left);
	bottom: var(--copyright-button-bottom);
	width: var(--copyright-button-size);
	height: var(--copyright-button-size);

	border-radius: 50%;
	border: 2px solid #000000;
	background: white;
	color: #000000;

	font-family: SofiaLight, Arial, sans-serif;
	font-size: var(--copyright-button-font-size);
	font-weight: bold;
	line-height: 1;

	display: flex;
	align-items: center;
	justify-content: center;

	cursor: pointer;
	z-index: 20;

	touch-action: manipulation;
	transform-origin: var(--copyright-button-origin-x)
		var(--copyright-button-origin-y);
	transform: scale(var(--copyright-button-scale));
	transition:
		opacity var(--action-button-fade-ms) ease,
		transform var(--action-button-fade-ms) ease;
}

#homeButton.is-idle-hidden,
#languageButton.is-idle-hidden,
#copyrightButton.is-idle-hidden {
	opacity: 0;
	pointer-events: none;
}

#homeButton.is-idle-hidden {
	transform: scale(calc(var(--home-button-scale) * var(--action-button-idle-scale)));
}

#languageButton.is-idle-hidden {
	transform: scale(
		calc(var(--language-button-scale) * var(--action-button-idle-scale))
	);
}

#copyrightButton.is-idle-hidden {
	transform: scale(
		calc(var(--copyright-button-scale) * var(--action-button-idle-scale))
	);
}

#copyrightButton span {
	transform: translateY(-2px);
}

#copyrightButton:active {
	transform: scale(calc(var(--copyright-button-scale) * 0.95));
}

#copyrightOverlay {
	position: fixed;
	inset: 0;

	background: rgba(255, 255, 255, 0.82);

	display: flex;
	align-items: center;
	justify-content: center;

	z-index: 30;
}

#copyrightOverlay.hidden {
	display: none;
}

#copyrightPopup {
	position: relative;

	width: min(520px, calc(100vw - 48px));
	max-height: calc(100vh - 80px);
	overflow-y: auto;

	background: white;
	border: 2px solid #be1a1a;
	border-radius: 18px;

	padding: 32px 28px 28px 28px;

	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);

	font-family: SofiaLight, Arial, sans-serif;
	color: #333;
}

#copyrightPopup h2 {
	margin: 0 0 16px 0;

	color: #be1a1a;
	font-size: 24px;
	font-weight: bold;
}

#copyrightPopup p {
	margin: 0 0 14px 0;

	font-size: 17px;
	line-height: 1.45;
}

#copyrightCloseButton {
	position: absolute;
	top: 12px;
	right: 12px;

	width: 34px;
	height: 34px;

	border-radius: 50%;
	border: none;
	background: #be1a1a;
	color: white;

	font-size: 24px;
	line-height: 1;

	cursor: pointer;

	display: flex;
	align-items: center;
	justify-content: center;
}

#copyrightCloseButton span {
	transform: translateY(-3px);
}

#copyrightCloseButton:active {
	transform: scale(0.95);
}

@keyframes idlePromptBounce {
	0%,
	100% {
		transform:
			translate(
				var(--idle-prompt-offset-x),
				var(--idle-prompt-offset-y)
			)
			rotate(var(--idle-prompt-rotation))
			scale(var(--idle-prompt-scale));
	}

	50% {
		transform:
			translate(
				var(--idle-prompt-offset-x),
				calc(var(--idle-prompt-offset-y) - 12px)
			)
			rotate(var(--idle-prompt-rotation))
			scale(calc(var(--idle-prompt-scale) * 1.015));
	}
}

@media (max-width: 899px) {
	#idlePromptImage {
		width: min(72vw, 320px);
		max-width: calc(100vw - 48px);
	}
}
