/* QUIZ Nasza Wkra – widok questu na stronie */

.qnw-quest {
	--qnw-akcent: #1e5631;
	--qnw-papier: #fbf6ec;
	--qnw-szerokosc: 1000px;

	max-width: 900px;
	margin: 0 auto 2.5rem;
	font-family: inherit;
}

/* Pasek postępu */

.qnw-postep {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	justify-content: center;
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
	counter-reset: none;
}

.qnw-postep li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.qnw-postep a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border: 2px solid rgba(30, 86, 49, 0.35);
	border: 2px solid color-mix(in srgb, var(--qnw-akcent) 35%, transparent);
	border-radius: 50%;
	color: var(--qnw-akcent);
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.qnw-postep a:hover,
.qnw-postep a:focus-visible {
	background: rgba(30, 86, 49, 0.12);
	background: color-mix(in srgb, var(--qnw-akcent) 12%, transparent);
	border-color: var(--qnw-akcent);
}

.qnw-krok--aktywny a {
	background: var(--qnw-akcent);
	border-color: var(--qnw-akcent);
	color: #fff;
}

.qnw-krok--zrobiony a {
	border-color: var(--qnw-akcent);
}

.qnw-krok--zablokowany a {
	border-style: dashed;
	color: #9a9a9a;
	border-color: #d5d5d5;
	pointer-events: none;
	cursor: default;
}

/* Scena ze slajdem */

.qnw-scena {
	position: relative;
	aspect-ratio: var(--qnw-proporcje, 1200 / 1696);
	overflow: hidden;
	border-radius: 10px;
	background: var(--qnw-papier);
	box-shadow: 0 2px 18px rgba(20, 40, 25, 0.14);
}

.qnw-scena .qnw-grafika {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	margin: 0;
	border-radius: inherit;
}

.qnw-brak {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	margin: 0;
	padding: 2rem;
	color: #7a7a7a;
	text-align: center;
}

.qnw-pola {
	position: absolute;
	inset: 0;
}

/* Pola interaktywne */

.qnw-pole {
	position: absolute;
	box-sizing: border-box;
	margin: 0;
	padding: 0 0.15em;
	border: 0;
	border-radius: 4px;
	background: rgba(30, 86, 49, 0.06);
	background: color-mix(in srgb, var(--qnw-akcent) 6%, transparent);
	box-shadow: inset 0 0 0 1px rgba(30, 86, 49, 0.2);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--qnw-akcent) 18%, transparent);
	color: #14200f;
	font-family: inherit;
	font-weight: 700;
	line-height: 1;
	transition: background-color 0.15s ease, box-shadow 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.qnw-pole::placeholder {
	color: rgba(30, 86, 49, 0.45);
	color: color-mix(in srgb, var(--qnw-akcent) 45%, transparent);
	font-weight: 400;
}

.qnw-pole:hover {
	background: rgba(30, 86, 49, 0.11);
	background: color-mix(in srgb, var(--qnw-akcent) 11%, transparent);
}

.qnw-pole:focus,
.qnw-pole:focus-visible {
	outline: 0;
	background: #fff;
	box-shadow: 0 0 0 2px var(--qnw-akcent);
}

.qnw-pole--tekst {
	text-align: center;
}

.qnw-pole--litera,
.qnw-pole--haslo {
	padding: 0;
	text-align: center;
	text-transform: uppercase;
}

.qnw-pole--zebrana {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	text-align: center;
	text-transform: uppercase;
}

.qnw-pole--zbierana {
	background: rgba(30, 86, 49, 0.16);
	background: color-mix(in srgb, var(--qnw-akcent) 16%, transparent);
	box-shadow: inset 0 0 0 2px var(--qnw-akcent);
}

.qnw-pole--zebrana {
	background: rgba(30, 86, 49, 0.1);
	background: color-mix(in srgb, var(--qnw-akcent) 10%, transparent);
	color: var(--qnw-akcent);
	cursor: default;
}

.qnw-pole--zebrana:empty::after {
	content: "?";
	opacity: 0.35;
}

/* Kratka z literą wydrukowaną na karcie – przezroczysta, litera zostaje widoczna z grafiki. */
.qnw-pole--wybor {
	background: transparent;
	box-shadow: none;
	cursor: pointer;
	border-radius: 6px;
}

.qnw-pole--wybor:hover {
	background: rgba(30, 86, 49, 0.1);
	background: color-mix(in srgb, var(--qnw-akcent) 10%, transparent);
	box-shadow: inset 0 0 0 1px rgba(30, 86, 49, 0.35);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--qnw-akcent) 35%, transparent);
}

.qnw-pole--wybor:focus-visible {
	outline: 0;
	background: rgba(30, 86, 49, 0.1);
	box-shadow: 0 0 0 2px var(--qnw-akcent);
}

.qnw-pole--wybor[aria-pressed="true"] {
	background: rgba(30, 86, 49, 0.14);
	background: color-mix(in srgb, var(--qnw-akcent) 14%, transparent);
	box-shadow: inset 0 0 0 3px var(--qnw-akcent);
}

.qnw-pole--dobrze,
.qnw-pole--wybor[aria-pressed="true"].qnw-pole--dobrze {
	background: rgba(46, 125, 50, 0.16);
	box-shadow: inset 0 0 0 3px #2e7d32;
	color: #1b5e20;
}

.qnw-pole--blad,
.qnw-pole--wybor[aria-pressed="true"].qnw-pole--blad {
	background: rgba(179, 45, 46, 0.12);
	box-shadow: inset 0 0 0 2px #b32d2e;
}

/* Nawigacja */

.qnw-nawigacja {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 1.1rem;
}

.qnw-pusto {
	display: block;
	min-width: 1px;
}

.qnw-przycisk {
	display: inline-block;
	padding: 0.7em 1.6em;
	border: 2px solid var(--qnw-akcent);
	border-radius: 999px;
	background: var(--qnw-akcent);
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.12s ease, background-color 0.15s ease, opacity 0.15s ease;
}

.qnw-przycisk:hover,
.qnw-przycisk:focus-visible {
	color: #fff;
	transform: translateY(-1px);
}

.qnw-przycisk--wstecz {
	background: transparent;
	color: var(--qnw-akcent);
}

.qnw-przycisk--wstecz:hover,
.qnw-przycisk--wstecz:focus-visible {
	background: rgba(30, 86, 49, 0.1);
	background: color-mix(in srgb, var(--qnw-akcent) 10%, transparent);
	color: var(--qnw-akcent);
}

.qnw-przycisk--dalej[hidden] {
	display: none;
}

.qnw-podpowiedz {
	flex: 1 1 auto;
	margin: 0;
	color: #6b6b6b;
	font-size: 0.92rem;
	text-align: center;
}

.qnw-podpowiedz[hidden] {
	display: none;
}

.qnw-podpowiedz--dobrze {
	color: #2e7d32;
	font-weight: 600;
}

.qnw-podpowiedz--blad {
	color: #b32d2e;
	font-weight: 600;
}

.qnw-podpowiedz--czekaj {
	color: #8a8a8a;
}

.qnw-ponow {
	font-size: inherit;
	font-weight: 600;
}

/* Wynik hasła */

.qnw-wynik {
	margin-top: 1.1rem;
	padding: 1rem 1.2rem;
	border-radius: 10px;
	border-left: 5px solid var(--qnw-akcent);
	background: rgba(30, 86, 49, 0.08);
	background: color-mix(in srgb, var(--qnw-akcent) 8%, transparent);
}

.qnw-wynik[hidden] {
	display: none;
}

.qnw-wynik--blad {
	border-left-color: #b32d2e;
	background: rgba(179, 45, 46, 0.08);
}

.qnw-wynik p:last-child {
	margin-bottom: 0;
}

.qnw-wynik p {
	margin-top: 0;
}

.qnw-wynik-akcja {
	margin: 0.6rem 0 0;
}

/* Certyfikat */

.qnw-certyfikat {
	width: min(94vw, 960px);
	max-height: 94vh;
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 14px;
	background: var(--qnw-papier, #fbf6ec);
	color: #14200f;
	box-shadow: 0 20px 60px rgba(10, 25, 15, 0.45);
	overflow: auto;
}

.qnw-certyfikat::backdrop {
	background: rgba(10, 25, 15, 0.62);
}

.qnw-certyfikat[open] {
	display: block;
}

.qnw-certyfikat-wnetrze {
	padding: clamp(0.9rem, 2.5vw, 1.6rem);
}

.qnw-certyfikat-tytul {
	margin: 0 0 0.8rem;
	color: var(--qnw-akcent);
	font-size: 1.3rem;
	line-height: 1.2;
}

.qnw-certyfikat-karta {
	position: relative;
	container-type: inline-size;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 14px rgba(20, 40, 25, 0.18);
}

.qnw-certyfikat-grafika {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
}

/* Napisy leżą na liniach grafiki 1492 × 1054 – te same proporcje co w pobieranym pliku. */
.qnw-certyfikat-napis {
	position: absolute;
	transform: translateX(-50%);
	color: #1d3b2a;
	line-height: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	pointer-events: none;
}

.qnw-certyfikat-napis--imie {
	left: 50%;
	bottom: 51.4%;
	max-width: 51%;
	font-size: 1.4rem;
	font-size: 3.2cqw;
	font-weight: 700;
}

.qnw-certyfikat-napis--data,
.qnw-certyfikat-napis--organizator {
	bottom: 22.4%;
	max-width: 12%;
	font-size: 0.75rem;
	font-size: 1.6cqw;
	font-weight: 600;
}

.qnw-certyfikat-napis--data {
	left: 35.86%;
}

.qnw-certyfikat-napis--organizator {
	left: 64.4%;
}

.qnw-certyfikat-pole {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin: 1rem 0 0;
}

.qnw-certyfikat-pole label {
	font-weight: 600;
	font-size: 0.95rem;
}

.qnw-certyfikat-pole input {
	box-sizing: border-box;
	width: 100%;
	max-width: 28rem;
	padding: 0.6em 0.8em;
	border: 2px solid rgba(30, 86, 49, 0.35);
	border: 2px solid color-mix(in srgb, var(--qnw-akcent) 35%, transparent);
	border-radius: 8px;
	background: #fff;
	color: #14200f;
	font: inherit;
	font-size: 1rem;
}

.qnw-certyfikat-pole input:focus {
	outline: 0;
	border-color: var(--qnw-akcent);
}

.qnw-certyfikat-pole input.qnw-pole--blad {
	border-color: #b32d2e;
	box-shadow: none;
}

.qnw-certyfikat-przyciski {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 1rem 0 0;
}

/* Stopka */

.qnw-stopka {
	margin: 0.9rem 0 0;
	text-align: center;
}

.qnw-link {
	padding: 0;
	border: 0;
	background: none;
	color: #7a7a7a;
	font-size: 0.85rem;
	text-decoration: underline;
	cursor: pointer;
}

.qnw-link:hover {
	color: var(--qnw-akcent);
}

/* Telefony */

@media (max-width: 600px) {
	.qnw-nawigacja {
		flex-wrap: wrap;
	}

	.qnw-podpowiedz {
		order: 3;
		flex-basis: 100%;
	}

	.qnw-przycisk {
		padding: 0.65em 1.2em;
		font-size: 0.95rem;
	}

	.qnw-postep a {
		width: 1.7rem;
		height: 1.7rem;
		font-size: 0.75rem;
	}
}

/* Lupa – powiększenie fragmentu karty pod kursorem */

.qnw-lupa {
	position: absolute;
	left: 0;
	top: 0;
	z-index: 5;
	width: 260px;
	height: 260px;
	border-radius: 50%;
	border: 3px solid rgba(255, 255, 255, 0.92);
	background-color: var(--qnw-papier);
	background-repeat: no-repeat;
	box-shadow: 0 10px 30px rgba(20, 40, 25, 0.35), inset 0 0 0 1px rgba(20, 40, 25, 0.18);
	opacity: 0;
	transform: translate(-50%, -50%) scale(0.9);
	transform-origin: center;
	transition: opacity 0.12s ease, transform 0.12s ease;
	pointer-events: none;
}

.qnw-lupa.jest {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

.qnw-wskazowka-lupa {
	margin: 10px 0 0;
	color: rgba(20, 40, 25, 0.62);
	font-size: 0.9rem;
	text-align: center;
}

@media (prefers-reduced-motion: reduce) {
	.qnw-lupa {
		transition: none;
	}
}

/* ---------- Belka nad kartą ---------- */

.qnw-belka {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	margin: 0 0 0.75rem;
}

.qnw-belka .qnw-postep {
	flex: 1 1 auto;
	margin: 0;
}

.qnw-wyjscie {
	color: var(--qnw-akcent);
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.qnw-wyjscie:hover,
.qnw-wyjscie:focus-visible {
	text-decoration: underline;
}

.qnw-belka-info {
	margin: 0;
	color: rgba(20, 40, 25, 0.6);
	font-size: 0.85rem;
	white-space: nowrap;
}

.qnw-belka-info:empty {
	display: none;
}

/* ---------- Plansza: rysunek i tabela ---------- */

.qnw-plansza {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
}

.qnw-plansza .qnw-scena {
	width: 100%;
}

/* ---------- Tryb gry ---------- */

.single-wkra_slajd .naglowek-blok,
.single-wkra_slajd .stopka {
	display: none;
}

/* ---------- Szeroki ekran: karta na wysokość okna ---------- */

@media (min-width: 1000px) {

	/* Karta na pełną wysokość okna. Szerokość liczona z dostępnej wysokości
	   i proporcji grafiki – pudełko sceny musi trzymać proporcje obrazu,
	   bo pola są pozycjonowane w procentach sceny. */

	.qnw-plansza .qnw-scena {
		width: min( 100%, calc( var(--qnw-dostepna, 70vh) * var(--qnw-proporcje, 1200 / 1696) ) );
	}
}
