.qr-page {
	--qr-ink: #17233a;
	--qr-muted: #65758b;
	--qr-line: rgba(24, 48, 78, 0.12);
	--qr-blue: #0164b0;
	--qr-violet: #530187;
	--qr-soft: #eef4fa;
	--qr-panel: rgba(255, 255, 255, 0.97);
	color: var(--qr-ink);
}

.qr-hero {
	position: relative;
	min-height: 20rem;
	padding: clamp(2rem, 5vw, 4.5rem);
	overflow: hidden;
	border: 1px solid rgba(1, 100, 176, 0.14);
	border-radius: 1.75rem;
	background:
		radial-gradient(circle at 88% 16%, rgba(112, 217, 229, 0.24), transparent 26%),
		radial-gradient(circle at 73% 92%, rgba(83, 1, 135, 0.13), transparent 34%),
		linear-gradient(135deg, #f7fbff 0%, #edf4fb 48%, #f7f0fb 100%);
	box-shadow: 0 1.5rem 4rem rgba(39, 72, 105, 0.1);
}

.qr-hero::before {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--qr-blue), #167fbd 45%, var(--qr-violet));
	content: '';
}

.qr-hero__content {
	position: relative;
	z-index: 2;
	max-width: 780px;
}

.qr-hero__lead {
	color: #43536a;
	text-wrap: pretty;
}

.qr-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.5rem 0.75rem;
	border: 1px solid rgba(13, 137, 97, 0.18);
	border-radius: 999px;
	background: rgba(236, 252, 246, 0.88);
	color: #087553;
	font-size: 0.84rem;
	font-weight: 700;
}

.qr-badge--accent {
	border-color: rgba(83, 1, 135, 0.14);
	background: rgba(248, 240, 253, 0.9);
	color: #5e1686;
}

.qr-badge .material-icons {
	font-size: 1.05rem;
}

.qr-hero__mark {
	position: absolute;
	right: clamp(2rem, 6vw, 6rem);
	bottom: clamp(1.5rem, 4vw, 3.5rem);
	display: grid;
	grid-template-columns: repeat(5, 1.05rem);
	grid-template-rows: repeat(5, 1.05rem);
	gap: 0.45rem;
	width: 7rem;
	height: 7rem;
	padding: 0.8rem;
	transform: rotate(8deg);
	border: 0.7rem solid rgba(1, 100, 176, 0.13);
	border-radius: 1.1rem;
	opacity: 0.9;
}

.qr-hero__mark span {
	border-radius: 0.18rem;
	background: rgba(83, 1, 135, 0.26);
}

.qr-hero__mark span:nth-child(2) {
	grid-column: 4;
}

.qr-hero__mark span:nth-child(3) {
	grid-row: 3;
	grid-column: 3;
}

.qr-hero__mark span:nth-child(4) {
	grid-row: 5;
	grid-column: 1;
}

.qr-hero__mark span:nth-child(5) {
	grid-row: 5;
	grid-column: 5;
}

.qr-controls {
	display: grid;
	gap: 1rem;
}

.qr-control-card,
.qr-preview-card {
	border: 1px solid var(--qr-line);
	border-radius: 1.2rem;
	background: var(--qr-panel);
	box-shadow: 0 0.8rem 2.4rem rgba(32, 59, 92, 0.07);
}

.qr-control-card {
	padding: 1.2rem;
}

details.qr-control-card {
	padding: 0;
}

.qr-control-card__heading {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	margin-bottom: 1rem;
}

details .qr-control-card__heading {
	margin: 0;
	padding: 1.2rem;
	cursor: pointer;
	list-style: none;
}

details .qr-control-card__heading::-webkit-details-marker {
	display: none;
}

.qr-control-card__body {
	padding: 0 1.2rem 1.2rem;
	border-top: 1px solid rgba(24, 48, 78, 0.08);
}

.qr-control-card__body > :first-child {
	margin-top: 1.1rem;
}

.qr-summary-icon {
	margin-left: auto;
	transition: transform 0.2s ease;
}

details[open] .qr-summary-icon {
	transform: rotate(180deg);
}

.qr-step {
	display: inline-grid;
	flex: 0 0 auto;
	width: 2.15rem;
	height: 2.15rem;
	place-items: center;
	border-radius: 0.7rem;
	background: linear-gradient(135deg, var(--qr-blue), #334aa4);
	box-shadow: 0 0.45rem 1rem rgba(1, 100, 176, 0.2);
	color: #fff;
	font-weight: 800;
}

.qr-control-card .form-label {
	color: #43536a;
	font-size: 0.82rem;
	font-weight: 700;
}

.qr-control-card .form-control,
.qr-control-card .form-select {
	border-color: rgba(32, 59, 92, 0.16);
	background-color: #fff;
}

.qr-control-card .form-control:focus,
.qr-control-card .form-select:focus {
	border-color: #1680c4;
	box-shadow: 0 0 0 0.2rem rgba(1, 100, 176, 0.11);
}

.qr-type-tabs {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.45rem;
	margin-bottom: 1rem;
}

.qr-type-tab {
	display: flex;
	min-height: 3.3rem;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.45rem;
	border: 1px solid rgba(32, 59, 92, 0.12);
	border-radius: 0.7rem;
	background: #f8fafc;
	color: #4a5d74;
	font-size: 0.76rem;
	font-weight: 700;
	transition:
		border-color 0.18s ease,
		background 0.18s ease,
		color 0.18s ease,
		transform 0.18s ease;
}

.qr-type-tab:hover {
	transform: translateY(-1px);
	border-color: rgba(1, 100, 176, 0.3);
}

.qr-type-tab.active {
	border-color: transparent;
	background: linear-gradient(135deg, var(--qr-blue), #4148a0);
	box-shadow: 0 0.45rem 1rem rgba(1, 100, 176, 0.18);
	color: #fff;
}

.qr-type-tab .material-icons {
	font-size: 1.05rem;
}

.qr-template-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.55rem;
}

.qr-template-option {
	position: relative;
	display: grid;
	min-height: 6.2rem;
	padding: 0.8rem;
	place-items: center;
	border: 1px solid rgba(32, 59, 92, 0.12);
	border-radius: 0.8rem;
	background: #f8fafc;
	cursor: pointer;
	text-align: center;
	transition: all 0.18s ease;
}

.qr-template-option:last-child {
	grid-column: 1 / -1;
}

.qr-template-option:has(input:checked) {
	border-color: var(--qr-blue);
	background: rgba(1, 100, 176, 0.07);
	box-shadow: inset 0 0 0 1px var(--qr-blue);
}

.qr-template-option input {
	position: absolute;
	opacity: 0;
}

.qr-template-option .material-icons {
	color: var(--qr-blue);
}

.qr-template-option strong {
	font-size: 0.86rem;
}

.qr-template-option small {
	color: var(--qr-muted);
}

.qr-upload {
	padding: 0.9rem;
	border: 1px dashed rgba(1, 100, 176, 0.27);
	border-radius: 0.8rem;
	background: #f8fbff;
}

.qr-quality {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 1rem;
	border: 1px solid rgba(20, 148, 104, 0.16);
	border-radius: 1rem;
	background: #eefbf6;
	color: #087553;
}

.qr-quality.is-warning {
	border-color: rgba(202, 128, 0, 0.2);
	background: #fff8e8;
	color: #8d5a00;
}

.qr-quality.is-danger {
	border-color: rgba(190, 44, 56, 0.18);
	background: #fff0f1;
	color: #a51e2e;
}

.qr-quality .material-icons {
	font-size: 1.45rem;
}

.qr-quality p {
	font-size: 0.82rem;
	line-height: 1.4;
}

.qr-preview-card {
	position: sticky;
	top: 1rem;
	overflow: hidden;
}

.qr-preview-toolbar,
.qr-export-panel {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.2rem;
	background: #fff;
}

.qr-preview-toolbar {
	border-bottom: 1px solid rgba(32, 59, 92, 0.09);
}

.qr-preview-toolbar__eyebrow {
	display: block;
	margin-bottom: 0.1rem;
	color: var(--qr-muted);
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}

.qr-live-status {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	color: #087553;
	font-size: 0.78rem;
	font-weight: 700;
}

.qr-live-status i {
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: #18a875;
	box-shadow: 0 0 0 0.25rem rgba(24, 168, 117, 0.12);
}

.qr-live-status.is-busy i {
	background: #f1a21b;
	box-shadow: 0 0 0 0.25rem rgba(241, 162, 27, 0.12);
	animation: qr-pulse 1s infinite alternate;
}

@keyframes qr-pulse {
	to {
		opacity: 0.4;
	}
}

.qr-preview-stage {
	display: grid;
	min-height: 38rem;
	padding: clamp(1rem, 3vw, 2.5rem);
	place-items: center;
	background-color: #e8eef5;
	background-image:
		linear-gradient(rgba(52, 81, 113, 0.06) 1px, transparent 1px),
		linear-gradient(90deg, rgba(52, 81, 113, 0.06) 1px, transparent 1px);
	background-size: 24px 24px;
}

.qr-artwork {
	display: grid;
	width: min(100%, 780px);
	max-height: 72vh;
	place-items: center;
	filter: drop-shadow(0 1.5rem 2rem rgba(22, 43, 69, 0.2));
}

.qr-artwork svg {
	display: block;
	width: 100%;
	max-height: 70vh;
	border-radius: 0.35rem;
	background: #fff;
}

.qr-artwork__loading {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 1rem 1.2rem;
	border-radius: 1rem;
	background: #fff;
	box-shadow: 0 0.75rem 2rem rgba(22, 43, 69, 0.12);
	color: var(--qr-muted);
}

.qr-export-panel {
	align-items: flex-start;
	border-top: 1px solid rgba(32, 59, 92, 0.09);
}

.qr-export-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.5rem;
}

.qr-export-message {
	flex-basis: 100%;
	color: #087553;
	font-size: 0.8rem;
	text-align: right;
}

.qr-guide {
	max-width: 980px;
	margin-inline: auto;
	padding: clamp(1.5rem, 4vw, 3.5rem);
	border: 1px solid rgba(32, 59, 92, 0.09);
	border-radius: 1.5rem;
	background: #fff;
	box-shadow: 0 1.5rem 4rem rgba(32, 59, 92, 0.07);
}

.qr-guide__intro {
	padding-bottom: 2rem;
	border-bottom: 1px solid rgba(32, 59, 92, 0.1);
}

.qr-guide__kicker {
	display: block;
	margin-bottom: 0.75rem;
	color: var(--qr-blue);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.qr-guide__toc {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.55rem 1.25rem;
	margin: 2rem 0;
	padding: 1.25rem;
	border-radius: 1rem;
	background: #f2f7fc;
}

.qr-guide__toc strong {
	grid-column: 1 / -1;
}

.qr-guide__toc a {
	color: #245b8d;
	text-decoration: none;
}

.qr-guide section {
	padding: 2rem 0;
	border-bottom: 1px solid rgba(32, 59, 92, 0.09);
	scroll-margin-top: 1rem;
}

.qr-guide section:last-child {
	border-bottom: 0;
}

.qr-guide section > h2 {
	margin-bottom: 1rem;
	font-size: clamp(1.5rem, 3vw, 2rem);
}

.qr-guide p,
.qr-guide li {
	color: #43536a;
	line-height: 1.75;
}

.qr-steps {
	display: grid;
	gap: 0.75rem;
	padding-left: 1.4rem;
}

.qr-fact-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.75rem;
	margin: 1.5rem 0;
}

.qr-fact-grid div {
	display: grid;
	gap: 0.25rem;
	padding: 1.1rem;
	border: 1px solid rgba(1, 100, 176, 0.12);
	border-radius: 0.9rem;
	background: #f7fbff;
}

.qr-fact-grid strong {
	color: var(--qr-blue);
	font-size: 1.35rem;
}

.qr-fact-grid span {
	color: var(--qr-muted);
	font-size: 0.82rem;
}

.qr-guide .accordion-item {
	overflow: hidden;
	border-color: rgba(32, 59, 92, 0.1);
}

.qr-print-root {
	display: none;
}

@media (min-width: 992px) {
	html.qr-generator-page {
		overflow-y: auto;
	}

	body.qr-generator-page {
		overflow: visible;
		overflow-x: clip;
	}

	.qr-preview-column {
		align-self: stretch;
	}
}

@media (max-width: 1199.98px) {
	.qr-preview-stage {
		min-height: 32rem;
	}

	.qr-export-panel {
		flex-direction: column;
	}

	.qr-export-actions {
		justify-content: flex-start;
	}

	.qr-export-message {
		text-align: left;
	}
}

@media (max-width: 991.98px) {
	.qr-hero {
		min-height: auto;
	}

	.qr-hero__mark {
		opacity: 0.28;
	}

	.qr-preview-card {
		position: static;
	}

	.qr-preview-stage {
		min-height: 28rem;
	}
}

@media (max-width: 575.98px) {
	.qr-page {
		padding-right: 0.75rem;
		padding-left: 0.75rem;
	}

	.qr-hero {
		padding: 1.5rem;
		border-radius: 1.15rem;
	}

	.qr-hero__mark {
		display: none;
	}

	.qr-type-tabs {
		grid-template-columns: repeat(2, 1fr);
	}

	.qr-control-card,
	details .qr-control-card__heading,
	.qr-control-card__body {
		padding-right: 1rem;
		padding-left: 1rem;
	}

	.qr-preview-toolbar,
	.qr-export-panel {
		padding: 0.9rem;
	}

	.qr-preview-stage {
		min-height: 21rem;
		padding: 0.75rem;
	}

	.qr-export-actions .btn {
		flex: 1 1 calc(50% - 0.5rem);
	}

	.qr-guide {
		padding: 1.25rem;
	}

	.qr-guide__toc,
	.qr-fact-grid {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.qr-page *,
	.qr-page *::before,
	.qr-page *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}

@media print {
	body.qr-printing > *:not(.qr-print-root) {
		display: none !important;
	}

	body.qr-printing .qr-print-root {
		display: grid !important;
		width: 100vw;
		height: 100vh;
		place-items: center;
	}

	body.qr-printing .qr-print-root svg {
		display: block;
		max-width: 100%;
		max-height: 100%;
	}
}
