:root {
	--red: #c6110c;
	--text: #111;
	--text-soft: #222;
	--caption: #555;
	--bg: #fff;
	--overlay: rgba(0, 0, 0, 0.45);
	--strip-width: 10vw;
	--strip-max-width: 84px;
	--strip-min-width: 56px;
	--content-side-padding: 54px;
}

* {
	box-sizing: border-box;
}

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

body {
	font-family: 'Sofia Sans Condensed', sans-serif;
	background: #000;
	color: var(--text);
}

#app {
	width: 100%;
	height: 100%;
}

.view {
	width: 100%;
	height: 100dvh;
}

.hidden {
	display: none !important;
}

/* ---------------------------------
   Scanner view
--------------------------------- */

.scanner-screen {
	position: relative;
	width: 100%;
	height: 100%;
	background: #000;
	overflow: hidden;
}

.scanner-camera {
	position: absolute;
	inset: 0;
}

.scanner-overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.scanner-label {
	position: absolute;
	left: 50%;
	bottom: 34px;
	transform: translateX(-50%);
	width: min(78vw, 360px);
	padding: 10px 18px;
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--text);
	font-weight: 700;
	font-size: 18px;
	text-align: center;
}

.scanner-error-box {
	position: absolute;
	left: 50%;
	bottom: 92px;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	pointer-events: auto;
}

.scanner-error-text {
	color: #fff;
	font-size: 18px;
	font-weight: 700;
	text-align: center;
}

.scanner-retry-btn {
	border: 0;
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--text);
	padding: 10px 16px;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
}

.scanner-list-btn {
	position: absolute;
	top: 40px;
	left: 0;
	width: clamp(
		var(--strip-min-width),
		var(--strip-width),
		var(--strip-max-width)
	);
	aspect-ratio: 1;
	display: grid;
	place-items: center;
	z-index: 3;
	border: 0;
	background: transparent;
	color: #fff;
	font: inherit;
	cursor: pointer;
}

.permission-screen {
	width: 100%;
	height: 100%;
	background: #fff;
	display: grid;
	place-items: center;
	padding: 28px;
}

.permission-box {
	max-width: 420px;
	text-align: center;
}

.permission-text {
	font-size: 22px;
	line-height: 1.3;
	margin: 0 0 20px;
}

.permission-button {
	border: 0;
	border-radius: 18px;
	background: var(--red);
	color: #fff;
	padding: 12px 18px;
	font: inherit;
	font-size: 18px;
	font-weight: 700;
	cursor: pointer;
}

/* html5-qrcode internals cleanup */
#qr-reader {
	width: 100%;
	height: 100%;
}

#qr-reader video {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
}

#qr-reader__dashboard,
#qr-reader__scan_region img {
	display: none !important;
}

/* ---------------------------------
   Exhibit view
--------------------------------- */

.list-screen,
.exhibit-screen {
	position: relative;
	width: 100%;
	height: 100%;
	background: var(--bg);
	overflow: hidden;
}

.exhibit-sidebar {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: clamp(
		var(--strip-min-width),
		var(--strip-width),
		var(--strip-max-width)
	);
	background: var(--red);
}

.exhibit-back {
	position: absolute;
	top: 40px;
	left: 0;
	width: clamp(
		var(--strip-min-width),
		var(--strip-width),
		var(--strip-max-width)
	);
	aspect-ratio: 1;
	display: grid;
	place-items: center;
	z-index: 2;
	border: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
}

.exhibit-back svg {
	width: 58%;
	height: 58%;
}

.exhibit-lang {
	position: absolute;
	left: 0;
	bottom: 28px;
	width: clamp(
		var(--strip-min-width),
		var(--strip-width),
		var(--strip-max-width)
	);
	display: grid;
	place-items: center;
	z-index: 2;
	border: 0;
	background: transparent;
	color: #fff;
	text-decoration: underline;
	font: inherit;
	font-size: 24px;
	font-weight: 700;
	cursor: pointer;
}

.list-scroll,
.exhibit-scroll {
	position: absolute;
	inset: 0;
	overflow-y: auto;
}

.list-content,
.exhibit-content {
	padding-top: 80px;
	padding-bottom: 62px;
	padding-left: var(--content-side-padding);
	padding-right: var(--content-side-padding);
	margin-left: clamp(
		var(--strip-min-width),
		var(--strip-width),
		var(--strip-max-width)
	);
}

.exhibit-content {
	padding-bottom: 118px;
}

.list-title,
.exhibit-title {
	font-size: 47px;
	line-height: 1.06;
	margin: 0 0 20px;
	color: var(--text);
	font-weight: 700;
}

.list-title {
	font-size: 62px;
	margin-bottom: 8px;
}

.list-subtitle {
	margin: 0 0 28px;
	color: var(--text-soft);
	font-size: 22px;
	font-weight: 400;
	line-height: 1.2;
}

.list-items {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.list-item {
	width: 100%;
	display: flex;
	align-items: center;
	border: 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.12);
	background: transparent;
	color: var(--text);
	padding: 16px 0 16px;
	font: inherit;
	line-height: 1;
	text-align: left;
	cursor: pointer;
}

.list-item-title {
	display: block;
	font-size: 22px;
	font-weight: 700;
	line-height: 1;
}

.exhibit-description {
	font-size: 23px;
	line-height: 1.5;
	margin: 0;
	color: var(--text-soft);
	text-align: justify;
}

.description-link {
	text-decoration: underline;
	text-underline-offset: 0.14em;
}

.description-link-external {
	color: inherit;
}

.description-link-internal {
	color: var(--red);
	font-weight: 700;
}

.description-small {
	font-size: 75%;
}

.description-poly {
	font-family: 'Noto Sans', sans-serif;
	font-size: 0.88em;
}

.description-full {
	display: block;
	font-size: 20px;
	line-height: 1.5;
	color: var(--text-soft);
	text-align: justify;
	text-align-last: auto;
}

.description-left {
	display: block;
	font-size: 20px;
	line-height: 1.5;
	color: var(--text-soft);
	text-align: left;
	text-align-last: auto;
}

.image-block {
	margin-top: 32px;
}

.exhibit-image {
	display: block;
	width: 100%;
	max-height: 460px;
	object-fit: contain;
}

.caption-container {
	width: 80%;
	margin: 0 auto;
}

.image-caption {
	margin-top: 23px;
	font-size: 20px;
	line-height: 1.33;
	color: var(--caption);
	text-align: justify;
	text-align-last: center;
}

.exhibit-center {
	width: 100%;
	height: 100%;
	display: grid;
	place-items: center;
	padding: 24px;
}

.exhibit-message {
	font-size: 20px;
	text-align: center;
}

.exhibit-bottom-nav {
	position: absolute;
	left: 50%;
	bottom: 22px;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	z-index: 3;
}

.list-scanner-btn {
	position: absolute;
	left: 50%;
	bottom: 22px;
	transform: translateX(-50%);
	z-index: 3;
}

.list-scanner-btn,
.exhibit-nav-btn {
	width: 54px;
	height: 54px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: var(--red);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

.exhibit-nav-btn:disabled {
	opacity: 0.36;
	cursor: default;
}

@media (max-width: 700px) {
	:root {
		--content-side-padding: 28px;
	}

	.list-title,
	.exhibit-title {
		font-size: 38px;
	}

	.list-title {
		font-size: 42px;
	}

	.list-item-title {
		font-size: 17px;
	}

	.exhibit-description {
		font-size: 14px;
	}

	.caption-container {
		width: 82%;
	}

	.scanner-label {
		font-size: 16px;
	}
}
