/* Puzzle (spielid 21) — Motivwahl, Spielfläche, Bedienleiste.
   Die Galerie-Rahmen fürs Paradies stehen bewusst NICHT hier, sondern in
   css/style.css: paradies.php und spieler.php laden dieses Stylesheet nicht. */

/* --- Motiv- und Stufenwahl --- */

.pz-motiv {
	display: flex;
	gap: 1.2rem;
	align-items: flex-start;
	flex-wrap: wrap;
}

.pz-motiv-bild {
	width: 300px;
	max-width: 100%;
	height: auto;
	border-radius: 12px;
	box-shadow: 0 6px 18px rgba(40, 22, 6, 0.28);
}

.pz-motiv-text {
	flex: 1 1 320px;
	min-width: 0;
}

.pz-motiv-text h2 {
	margin-top: 0;
}

.pz-stufen {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-top: 1rem;
}

.pz-stufe {
	display: flex;
	flex-direction: column;
	align-items: center;
	line-height: 1.25;
	padding: 0.55rem 1.1rem;
}

.pz-stufe span {
	font-size: 0.82rem;
	opacity: 0.85;
}

/* --- Spielfläche --- */

.pz-wrap {
	position: relative;
	max-width: 1060px;
	margin: 0 auto;
}

.pz-wrap canvas {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(35, 19, 5, 0.35);
	/* Wischgesten des Browsers abschalten — sonst scrollt die Seite,
	   während man ein Teil zieht. */
	touch-action: none;
	cursor: grab;
}

.pz-wrap canvas:active {
	cursor: grabbing;
}

.pz-fs-btn {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 9px;
	background: rgba(28, 16, 5, 0.72);
	color: #F6E3BC;
	font-size: 1.1rem;
	cursor: pointer;
}

.pz-fs-btn:hover {
	background: rgba(28, 16, 5, 0.9);
}

/* Vollbild: die Fullscreen-API füllt den Bildschirm schwarz, das Canvas soll
   darin so groß wie möglich stehen, ohne sein Seitenverhältnis zu verlieren. */
.pz-wrap:fullscreen,
.pz-wrap.pz-pseudo-fs {
	max-width: none;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #1B1004;
}

.pz-wrap:fullscreen canvas,
.pz-wrap.pz-pseudo-fs canvas {
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	border-radius: 0;
}

/* iOS kennt die Fullscreen-API nicht — dort wird der Wrapper per Klasse
   über die ganze Seite gelegt (Muster Chahar Barg / Schwimmen). */
.pz-wrap.pz-pseudo-fs {
	position: fixed;
	inset: 0;
	z-index: 9999;
}

/* --- Bedienleiste --- */

.pz-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	max-width: 1060px;
	margin: 0.8rem auto 0;
}

.pz-controls button {
	border: 0;
	border-radius: 9px;
	padding: 0.5rem 0.9rem;
	background: #E8D5AE;
	color: #3B2409;
	font: inherit;
	cursor: pointer;
}

.pz-controls button:hover {
	background: #F2E2C2;
}

.pz-controls button[aria-pressed="true"] {
	background: #F2C14E;
	font-weight: 600;
}

.pz-controls-luecke {
	flex: 1 1 auto;
}

.pz-status {
	max-width: 1060px;
	margin: 0.8rem auto 0;
	text-align: center;
	min-height: 1.5em;
}

@media (max-width: 640px) {
	.pz-motiv-bild {
		width: 100%;
	}
	.pz-stufe {
		flex: 1 1 44%;
	}
}
