.stories {
	margin: 26px 0 0;
}
.stories__scroller {
	display: flex;
	justify-content: flex-start;
	gap: 18px;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 6px 2px 8px;
	scrollbar-width: none;
	-ms-overflow-style: none;
}
.stories__scroller.is-overflow {
	justify-content: flex-start;
}
.stories__scroller::-webkit-scrollbar {
	display: none;
}
.stories__item {
	flex: 0 0 auto;
	width: 82px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	text-align: center;
	color: inherit;
	font: inherit;
}
.stories__item:focus-visible {
	outline: 2px solid var(--color-accent);
	outline-offset: 3px;
	border-radius: 12px;
}
.stories__ring {
	position: relative;
	width: 76px;
	height: 76px;
	margin: 0 auto 8px;
	display: block;
}
.stories__ring svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
	overflow: visible;
}
.stories__avatar {
	position: absolute;
	inset: 6px;
	width: calc(100% - 12px);
	height: calc(100% - 12px);
	border-radius: 50%;
	object-fit: cover;
	background: var(--color-blush);
	display: block;
}
.stories__name {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-family: var(--font-body);
	font-size: 13px;
	line-height: 1.2;
	font-weight: 400;
	color: var(--color-ink);
	letter-spacing: -0.02em;
}

body.is-stories-open {
	overflow: hidden;
}
.stories-viewer {
	position: fixed;
	inset: 0;
	z-index: 12000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(10, 10, 10, 0.72);


	opacity: 0;
	visibility: hidden;
	transition: opacity .28s ease, visibility .28s ease;
	--st-h: 90vh;
	--st-w: calc(var(--st-h) * 9 / 16);
	--st-gap: calc(var(--st-w) * .12);
}
.stories-viewer.is-open {
	opacity: 1;
	visibility: visible;
}
.stories-viewer[hidden] {
	display: none !important;
}
.stories-viewer.is-open[hidden] {
	display: flex !important;
}
.stories-viewer__close {
	position: fixed;
	top: 22px;
	right: 28px;
	z-index: 3;
	border: 0;
	background: transparent;
	color: #fff;
	font-family: var(--font-body);
	font-size: 15px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	padding: 8px 0;
}
.stories-viewer__stage {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
}
.stories-viewer__slide {
	position: absolute;
	left: 50%;
	top: 50%;
	width: var(--st-w);
	height: var(--st-h);
	max-height: 92vh;
	transform: translate(-50%, -50%) translateX(calc(var(--off, 0) * (var(--st-w) + var(--st-gap)))) scale(.86);
	filter: brightness(.2);
	transition: transform .4s cubic-bezier(.16, 1, .3, 1), filter .5s cubic-bezier(.16, 1, .3, 1);
	cursor: pointer;
}
.stories-viewer__slide.is-active {
	transform: translate(-50%, -50%) scale(1);
	filter: brightness(1);
	z-index: 2;
	cursor: pointer;
}
.stories-viewer__card {
	position: relative;
	width: 100%;
	height: 100%;
	border-radius: 24px;
	overflow: hidden;
	background: #000;
	box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
}
.stories-viewer__card::before,
.stories-viewer__card::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	z-index: 3;
	pointer-events: none;
}
.stories-viewer__card::before {
	top: 0;
	height: 96px;
	background: linear-gradient(to bottom, rgba(0, 0, 0, .5), transparent);
}
.stories-viewer__card::after {
	bottom: 0;
	height: 140px;
	background: linear-gradient(to top, rgba(0, 0, 0, .45), transparent);
}
.stories-viewer__bars {
	position: absolute;
	top: 10px;
	left: 10px;
	right: 10px;
	z-index: 5;
	display: flex;
	gap: 5px;
}
.stories-viewer__bar {
	flex: 1;
	height: 2.5px;
	border-radius: 2px;
	background: rgba(255, 255, 255, .35);
	overflow: hidden;
}
.stories-viewer__bar-fill {
	display: block;
	width: 100%;
	height: 100%;
	background: #fff;
	transform: scaleX(0);
	transform-origin: left center;
	will-change: transform;
}
.stories-viewer__label {
	position: absolute;
	top: 22px;
	left: 14px;
	z-index: 5;
	color: #fff;
	font-family: var(--font-body);
	font-size: 14px;
	font-weight: 500;
	text-shadow: 0 1px 8px rgba(0, 0, 0, .45);
}
.stories-viewer__frames,
.stories-viewer__frame {
	position: absolute;
	inset: 0;
}
.stories-viewer__media {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	user-select: none;
	-webkit-user-drag: none;
}
.stories-viewer__cta {
	position: absolute;
	left: 50%;
	bottom: 22px;
	z-index: 6;
	transform: translateX(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 12px 26px;
	border-radius: 999px;
	background: #fff;
	color: #111;
	font-family: var(--font-body);
	font-size: 15px;
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
}
.stories-viewer__cta:hover {
	color: #111;
	opacity: .92;
}
.stories-viewer__hit {
	position: absolute;
	top: 0;
	bottom: 0;
	z-index: 4;
	border: 0;
	padding: 0;
	background: transparent;
	cursor: pointer;
}
.stories-viewer__hit--next {
	left: 0;
	width: 100%;
}
.stories-viewer__slide:not(.is-active) .stories-viewer__hit,
.stories-viewer__slide:not(.is-active) .stories-viewer__cta {
	pointer-events: none;
}

@media (max-width: 768px) {
	.stories {
		margin: 22px 0 0;
	}
	.stories__scroller {
		gap: 14px;
		padding-left: 0;
		padding-right: 0;
	}
	.stories-viewer {
		background: #000;
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
		--st-h: 100dvh;
		--st-w: 100vw;
		--st-gap: 0px;
	}
	.stories-viewer__slide {
		transform: translate(-50%, -50%) translateX(calc(var(--off, 0) * 100%));
		filter: none;
		max-height: none;
	}
	.stories-viewer__slide.is-active {
		transform: translate(-50%, -50%);
		filter: none;
	}
	.stories-viewer__card {
		border-radius: 0;
		box-shadow: none;
	}
	.stories-viewer__close {
		width: 46px;
		height: 46px;
		top: 14px;
		right: 14px;
		padding: 0;
		border-radius: 50%;
		background: rgba(255, 255, 255, .12);
		font-size: 0;
	}
	.stories-viewer__close::before,
	.stories-viewer__close::after {
		content: '';
		position: absolute;
		left: 50%;
		top: 50%;
		width: 16px;
		height: 1.5px;
		background: #fff;
	}
	.stories-viewer__close::before {
		transform: translate(-50%, -50%) rotate(45deg);
	}
	.stories-viewer__close::after {
		transform: translate(-50%, -50%) rotate(-45deg);
	}
	.stories-viewer__cta {
		padding-left: 26px;
		padding-right: 26px;
	}
}


/* MARY integration: keep the source viewer behaviour and the salon's palette. */
.stories__ring { color: var(--color-accent); }
.stories__name { font-size: 12px; line-height: 1.4; letter-spacing: 0; }
.stories-viewer { margin: 0; padding: 0; border: 0; width: 100%; max-width: none; height: 100%; max-height: none; color: #fff; overflow: hidden; }
.stories-viewer::backdrop { background: transparent; }
.stories-viewer__stage { pointer-events: none; }
.stories-viewer__slide { pointer-events: auto; }
.stories-viewer__close, .stories-viewer__pause { min-height: 44px; padding: 10px 16px; background: #392730; color: #fff; border: 0; border-radius: var(--button-radius); font: 400 14px/1.4 var(--font-body); }
.stories-viewer__pause { position: fixed; top: 22px; left: 28px; z-index: 8; }
.stories-viewer__close { z-index: 8; }
.stories-viewer__hit--previous { left: 0; width: 28%; }
.stories-viewer__hit--next { left: 28%; width: 72%; }
.stories-viewer__cta { color: #392730 !important; background: #fff; max-width: calc(100% - 32px); white-space: normal; text-align: center; line-height: 1.3; }
.stories-viewer__frame[hidden] { display: none; }
@media(max-width:768px) {
 .stories-viewer__pause { top: max(20px,env(safe-area-inset-top)); left: 14px; }
 .stories-viewer__bars { top: max(10px,env(safe-area-inset-top)); }
 .stories-viewer__label { top: 76px; }
 .stories-viewer__cta { bottom: max(24px,env(safe-area-inset-bottom)); }
 .stories-viewer__close { font-size: 0; padding: 0; }
}
@media(prefers-reduced-motion:reduce) { .stories-viewer, .stories-viewer__slide { transition: none; } }
.mary-site .stories-viewer__close, .mary-site .stories-viewer__pause { font: 400 14px/1.4 var(--font-body); }
.stories-viewer__card { touch-action: none; }
@media(max-width:768px) { .mary-site .stories-viewer__close { font-size: 0; } }
