/* Vivet Stories – Frontend */
.vstr,
.vstr *,
.vstr-bubble,
.vstr-bubble * {
	box-sizing: border-box;
	-webkit-tap-highlight-color: transparent;
}

.vstr button,
.vstr-bubble button {
	-webkit-appearance: none;
	appearance: none;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	color: inherit;
	cursor: pointer;
	font: inherit;
	height: auto;
	letter-spacing: normal;
	line-height: 1;
	margin: 0;
	min-height: 0;
	min-width: 0;
	padding: 0;
	text-shadow: none;
	text-transform: none;
	width: auto;
}

.vstr button:focus-visible,
.vstr a:focus-visible,
.vstr-bubble button:focus-visible {
	outline: 2px solid var(--vstr-accent, #e9b898);
	outline-offset: 3px;
}

/* ---------- Viewer ---------- */
.vstr {
	--vstr-accent: #e9b898;
	--vstr-overlay: rgba(20, 12, 14, .86);
	--vstr-radius: 18px;
	--vstr-h: 88vh;
	--vstr-ease: cubic-bezier(.22, .8, .24, 1);
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	color: #fff;
	font-size: 14px;
	line-height: 1.3;
	touch-action: none;
	-webkit-font-smoothing: antialiased;
}

.vstr[hidden] { display: none !important; }
.vstr:focus { outline: none; }

.vstr__backdrop {
	position: absolute;
	inset: 0;
	background: var(--vstr-overlay);
	opacity: 0;
	transition: opacity .32s ease;
}

.vstr.is-blur .vstr__backdrop {
	-webkit-backdrop-filter: blur(16px) saturate(1.1);
	backdrop-filter: blur(16px) saturate(1.1);
}

.vstr__stage {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 28px;
	padding: 24px;
}

.vstr__card {
	position: relative;
	height: min(var(--vstr-h), 940px);
	aspect-ratio: 9 / 16;
	max-width: calc(100vw - 180px);
	border-radius: var(--vstr-radius);
	overflow: hidden;
	background: #0d0809;
	box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06);
	opacity: 0;
	transform: scale(.94);
	transition: opacity .32s ease, transform .42s var(--vstr-ease);
	cursor: pointer;
	user-select: none;
	-webkit-user-select: none;
	isolation: isolate;
}

.vstr--fade .vstr__card { transform: none; }
.vstr--rise .vstr__card { transform: translateY(48px); }

.vstr.is-open .vstr__backdrop { opacity: 1; }
.vstr.is-open .vstr__card { opacity: 1; transform: none; }
.vstr.is-dragging .vstr__card,
.vstr.is-dragging .vstr__backdrop { transition: none; }

/* Track & Slides */
.vstr__track {
	display: flex;
	height: 100%;
	transition: transform .42s var(--vstr-ease);
	will-change: transform;
}
.vstr__track.no-anim { transition: none; }

.vstr__slide {
	position: relative;
	flex: 0 0 100%;
	height: 100%;
	overflow: hidden;
}

.vstr__bg {
	position: absolute;
	inset: -40px;
	background-size: cover;
	background-position: center;
	filter: blur(28px) brightness(.55) saturate(1.2);
	transform: scale(1.1);
}

.vstr__img {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: contain;
	opacity: 0;
	transition: opacity .35s ease;
	-webkit-user-drag: none;
	pointer-events: none;
	border: 0 !important;
	border-radius: 0 !important;
	margin: 0 !important;
}
.vstr--cover .vstr__img { object-fit: cover; }
.vstr__slide.is-loaded .vstr__img { opacity: 1; }

.vstr__spin {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 28px;
	height: 28px;
	margin: -14px 0 0 -14px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, .2);
	border-top-color: var(--vstr-accent);
	animation: vstr-spin .8s linear infinite;
}
.vstr__slide.is-loaded .vstr__spin { display: none; }
@keyframes vstr-spin { to { transform: rotate(360deg); } }

/* Top: Fortschritt + Header */
.vstr__top {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	z-index: 3;
	padding: 12px 12px 34px;
	background: linear-gradient(to bottom, rgba(0, 0, 0, .45), rgba(0, 0, 0, 0));
	pointer-events: none;
}

.vstr__bars {
	display: flex;
	gap: 4px;
}
.vstr__bar {
	flex: 1 1 0;
	height: 2.5px;
	border-radius: 2px;
	background: rgba(255, 255, 255, .32);
	overflow: hidden;
}
.vstr__bar i {
	display: block;
	height: 100%;
	width: 100%;
	background: #fff;
	transform: scaleX(0);
	transform-origin: left center;
}
.vstr__bar.is-done i { transform: scaleX(1); }

.vstr__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 10px;
	min-height: 36px;
}
.vstr__ava {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	padding: 2px;
	background: var(--vstr-accent);
}
.vstr__ava span,
.vstr__ava img {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100% !important;
	height: 100% !important;
	border-radius: 50%;
	border: 2px solid #1a0f12;
	object-fit: cover;
	background: #1a0f12;
	color: var(--vstr-accent);
	font-size: 13px;
	font-weight: 700;
	margin: 0 !important;
}
.vstr__name {
	flex: 1 1 auto;
	min-width: 0;
	font-weight: 600;
	font-size: 14px;
	letter-spacing: .01em;
	text-shadow: 0 1px 6px rgba(0, 0, 0, .4);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.vstr__btns {
	display: flex;
	align-items: center;
	gap: 2px;
	margin-left: auto;
	pointer-events: auto;
}
.vstr .vstr__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	color: #fff;
	filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .45));
	transition: background-color .2s ease, transform .2s ease;
}
.vstr .vstr__icon:hover { background: rgba(255, 255, 255, .12); }
.vstr .vstr__icon:active { transform: scale(.92); }
.vstr__icon svg { width: 22px; height: 22px; display: block; }
.vstr__pause svg { width: 18px; height: 18px; }
.vstr__pause .i-play { display: none; }
.vstr.is-paused .vstr__pause .i-play { display: block; }
.vstr.is-paused .vstr__pause .i-pause { display: none; }

/* CTA */
.vstr__foot {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	display: flex;
	justify-content: center;
	padding: 60px 20px 26px;
	background: linear-gradient(to top, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0));
}
.vstr .vstr__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	max-width: 100%;
	padding: 13px 22px;
	border-radius: 999px;
	background: var(--vstr-accent);
	color: #1a0f12 !important;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .02em;
	line-height: 1.1;
	text-decoration: none !important;
	box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .55);
	transition: transform .2s ease, filter .2s ease;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.vstr .vstr__cta:hover { transform: translateY(-1px); filter: brightness(1.05); }
.vstr__cta svg { width: 16px; height: 16px; flex: 0 0 auto; }

/* Desktop-Pfeile */
.vstr .vstr__nav {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .1);
	border: 1px solid rgba(255, 255, 255, .16);
	color: #fff;
	opacity: 0;
	transition: opacity .3s ease .1s, background-color .2s ease, transform .2s ease;
}
.vstr.is-open .vstr__nav { opacity: 1; }
.vstr .vstr__nav:hover { background: rgba(255, 255, 255, .2); transform: scale(1.05); }
.vstr .vstr__nav[disabled] { opacity: .25 !important; cursor: default; transform: none; }
.vstr__nav svg { width: 22px; height: 22px; }
.vstr--noarrows .vstr__nav { display: none; }

/* Story-Zähler unter der Karte (Desktop) */
.vstr__count {
	position: absolute;
	left: 50%;
	bottom: max(10px, calc((100vh - min(var(--vstr-h), 940px)) / 2 - 34px));
	transform: translateX(-50%);
	font-size: 12px;
	letter-spacing: .14em;
	color: rgba(255, 255, 255, .55);
	opacity: 0;
	transition: opacity .3s ease;
	pointer-events: none;
	font-variant-numeric: tabular-nums;
}
.vstr.is-open .vstr__count { opacity: 1; }

/* ---------- Smartphone: Vollbild, clean ---------- */
@media (max-width: 767px), (pointer: coarse) and (max-width: 1024px) and (orientation: portrait) {
	.vstr__stage { padding: 0; gap: 0; }
	.vstr__card {
		width: 100%;
		height: 100%;
		max-width: none;
		aspect-ratio: auto;
		border-radius: 0;
		box-shadow: none;
	}
	.vstr .vstr__nav,
	.vstr__count { display: none; }
	.vstr__top { padding-top: calc(10px + env(safe-area-inset-top, 0px)); padding-left: 10px; padding-right: 6px; }
	.vstr__foot { padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
	.vstr .vstr__icon:hover { background: none; }
	.vstr--rise .vstr__card { transform: translateY(100%); }
	.vstr--zoom .vstr__card { transform: scale(.96); }
}

@media (prefers-reduced-motion: reduce) {
	.vstr__card, .vstr__track, .vstr__backdrop, .vstr__img, .vstr-bubble { transition: none !important; animation: none !important; }
}

/* ---------- Story-Bubble ---------- */
.vstr-bubble {
	--vstr-accent: #e9b898;
	position: fixed;
	z-index: 2147482999;
	bottom: calc(24px + env(safe-area-inset-bottom, 0px));
	right: 24px;
	display: flex;
	flex-direction: column;
	align-items: center;
	opacity: 0;
	transform: translateY(16px) scale(.85);
	transition: opacity .35s ease, transform .45s cubic-bezier(.22, .8, .24, 1);
	pointer-events: none;
}
.vstr-bubble--left { right: auto; left: 24px; }
.vstr-bubble.is-in { opacity: 1; transform: none; pointer-events: auto; }

.vstr-bubble .vstr-bubble__open {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.vstr-bubble__ring {
	position: relative;
	display: block;
	width: 84px;
	height: 84px;
	border-radius: 50%;
	padding: 3px;
	background: conic-gradient(from 210deg, var(--vstr-accent), #fff3ea, var(--vstr-accent), #b97a63, var(--vstr-accent));
	box-shadow: 0 14px 36px -10px rgba(0, 0, 0, .55);
	transition: transform .25s ease;
}
.vstr-bubble__ring::after {
	content: "";
	position: absolute;
	inset: -6px;
	border-radius: 50%;
	border: 1.5px solid var(--vstr-accent);
	opacity: 0;
	animation: vstr-pulse 2.6s ease-out infinite;
}
@keyframes vstr-pulse {
	0% { opacity: .7; transform: scale(.94); }
	70%, 100% { opacity: 0; transform: scale(1.18); }
}
.vstr-bubble__open:hover .vstr-bubble__ring { transform: scale(1.05); }
.vstr-bubble__ring img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	border-radius: 50%;
	border: 3px solid #fff !important;
	object-fit: cover;
	object-position: center 35%;
	margin: 0 !important;
	background: #1a0f12;
}
.vstr-bubble__label {
	margin-top: -11px;
	position: relative;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--vstr-accent);
	color: #1a0f12;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	line-height: 1.2;
	box-shadow: 0 0 0 2px #fff;
}
.vstr-bubble .vstr-bubble__x {
	position: absolute;
	top: -4px;
	right: -4px;
	width: 26px;
	height: 26px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #1a0f12;
	color: #fff;
	box-shadow: 0 0 0 2px #fff, 0 4px 12px rgba(0, 0, 0, .3);
}
.vstr-bubble__x svg { width: 12px; height: 12px; }
.vstr-bubble--left .vstr-bubble__x { right: auto; left: -4px; }

@media (max-width: 767px) {
	.vstr-bubble { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); right: 16px; }
	.vstr-bubble--left { left: 16px; right: auto; }
	.vstr-bubble__ring { width: 68px; height: 68px; }
	.vstr-bubble__label { font-size: 10px; padding: 3px 8px; }
	.vstr-bubble .vstr-bubble__x { width: 24px; height: 24px; }
}
