.p360-viewer {
	position: relative;
	width: 100%;
	margin: 0 auto;
	box-sizing: border-box;
	border-radius: 6px;
	overflow: hidden;
}
.p360-viewer * {
	box-sizing: border-box;
}
.p360-stage {
	position: relative;
	width: 100%;
	overflow: hidden;
	cursor: grab;
	touch-action: none;
	-webkit-user-select: none;
	user-select: none;
	line-height: 0;
}
.p360-stage.p360-dragging {
	cursor: grabbing;
}
/*
 * Alle Frames werden als eigene <img>-Elemente vorab angelegt und komplett
 * dekodiert (siehe p360-viewer.js). Beim Drehen/Autoplay wird nur noch die
 * Sichtbarkeit umgeschaltet (opacity/visibility) statt das src-Attribut
 * eines einzelnen <img> auszutauschen – das vermeidet Neu-Dekodierungen
 * und damit das Flackern/Blitzen bei schnellem Bildwechsel.
 */
.p360-frame-stack {
	position: relative;
	width: 100%;
	overflow: hidden;
	transform-origin: center center;
	will-change: transform;
}
.p360-frame-img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: block;
	object-fit: contain;
	pointer-events: none;
	-webkit-user-drag: none;
	opacity: 0;
	visibility: hidden;
}
.p360-frame-img.p360-frame-active {
	opacity: 1;
	visibility: visible;
}

/* Ladezustand */
.p360-loading {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: rgba(255, 255, 255, 0.85);
	transition: opacity 0.25s ease;
	z-index: 3;
}
.p360-loading.p360-hidden {
	opacity: 0;
	pointer-events: none;
}
.p360-spinner {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 3px solid #d5d5d5;
	border-top-color: #2271b1;
	animation: p360-spin 0.8s linear infinite;
}
@keyframes p360-spin {
	to { transform: rotate(360deg); }
}
.p360-loading-progress {
	font-size: 13px;
	color: #555;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Hinweis-Overlay */
.p360-hint {
	position: absolute;
	left: 50%;
	bottom: 14px;
	transform: translateX(-50%);
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 13px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	pointer-events: none;
	transition: opacity 0.4s ease;
	z-index: 2;
	white-space: nowrap;
}
.p360-hint.p360-hidden {
	opacity: 0;
}

/* Zoom-Steuerung */
.p360-zoom-controls {
	position: absolute;
	right: 10px;
	bottom: 10px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	z-index: 4;
}
.p360-zoom-btn {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.15);
	background: rgba(255, 255, 255, 0.9);
	color: #333;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.p360-zoom-btn:hover {
	background: #fff;
}
