/* =========================================================
   Puzzle Scatter — CSS v1.0.0
   ========================================================= */

.ps-wrapper {
	position: relative;
	width: 100%;
	overflow: hidden;
	user-select: none;
	-webkit-user-select: none;
}

/* ---------- Canvas ---------- */
.ps-canvas {
	display: block;
	width: 100%;
	height: 580px;
	cursor: crosshair;
	touch-action: none;
	transition: filter 0.4s ease;
}

.ps-wrapper--lb-open .ps-canvas {
	filter: blur(8px) brightness(0.25) saturate(0.3);
}

/* ---------- Interaction hint ---------- */
.ps-hint {
	position: absolute;
	bottom: 14px;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255,255,255,0.28);
	font-size: 0.70rem;
	letter-spacing: 0.10em;
	text-transform: uppercase;
	pointer-events: none;
	white-space: nowrap;
	transition: opacity 0.5s;
}

.ps-wrapper--lb-open .ps-hint,
.ps-wrapper--scattered .ps-hint {
	opacity: 0;
}

/* ---------- Assembling flash ---------- */
.ps-wrapper--flash .ps-canvas {
	filter: brightness(1.4) saturate(1.3);
	transition: filter 0.15s ease;
}

/* ---------- Lightbox ---------- */
.ps-lightbox {
	--ps-lb-bg: rgba(8, 5, 15, 0.97);
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.35s ease;
}

.ps-lightbox[aria-hidden="false"] {
	opacity: 1;
	pointer-events: auto;
}

.ps-lightbox__overlay {
	position: absolute;
	inset: 0;
	background: var(--ps-lb-bg);
	cursor: pointer;
}

.ps-lightbox__panel {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	transform: scale(0.82) translateY(12px);
	transition: transform 0.40s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ps-lightbox[aria-hidden="false"] .ps-lightbox__panel {
	transform: scale(1) translateY(0);
}

.ps-lightbox__img {
	display: block;
	max-width: 90vw;
	max-height: 82vh;
	object-fit: contain;
	border-radius: 3px;
	box-shadow:
		0 0 0 1px rgba(255,255,255,0.06),
		0 32px 100px rgba(0,0,0,0.92);
}

@media (max-width: 767px) {
	.ps-lightbox__img { max-width: 95vw; max-height: 78vh; }
}

.ps-lightbox__caption {
	margin: 0;
	color: rgba(255,255,255,0.58);
	font-size: 0.875rem;
	text-align: center;
	max-width: 68ch;
	line-height: 1.6;
	letter-spacing: 0.015em;
}

/* ---------- Close button ---------- */
.ps-lightbox__close {
	position: absolute;
	top: -52px;
	right: 0;
	width: 40px;
	height: 40px;
	border: none;
	cursor: pointer;
	color: #fff;
	padding: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.18s, background 0.18s;
}

.ps-lightbox__close--circle {
	background: rgba(255,255,255,0.12);
	border-radius: 50%;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.ps-lightbox__close--x-only { background: transparent; }
.ps-lightbox__close:hover   { transform: scale(1.14); background: rgba(255,255,255,0.22); }
.ps-lightbox__close svg     { width: 100%; height: 100%; }
