.cst-media-modal{position:fixed;inset:0;z-index:100000;display:none;align-items:center;justify-content:center;background:rgba(0,0,0,.9);padding:24px;}
	.cst-media-modal.is-open{display:flex;}
	.cst-media-dialog{position:relative;width:100%;max-width:1000px;}
	.cst-media-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;color:#fff;}
	.cst-media-head h3{margin:0;font-size:1.2rem;font-weight:600;color:#fff;}
	.cst-media-close{width:44px;height:44px;border:none;border-radius:50%;background:#fff;color:#111;font-size:1.6rem;line-height:1;cursor:pointer;flex-shrink:0;}
	.cst-media-viewport{position:relative;overflow:hidden;border-radius:10px;background:#000;}
	.cst-media-track{display:flex;transition:transform .35s ease;}
	.cst-media-slide{flex:0 0 100%;width:100%;display:flex;align-items:center;justify-content:center;}
	.cst-media-slide img{max-width:100%;max-height:78vh;object-fit:contain;display:block;margin:0 auto;}
	.cst-media-slide .cst-video-frame{position:relative;width:100%;height:var(--cst-video-height,auto);aspect-ratio:var(--cst-video-ratio,16 / 9);}
	#cst-videos-modal .cst-media-dialog{max-width:min(1000px,100%);}
	#cst-videos-modal .cst-media-head h3{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
	#cst-videos-modal .cst-media-track{align-items:flex-start;}
	#cst-videos-modal .cst-media-slide{min-width:0;}
	.cst-media-slide .cst-video-frame iframe,
	.cst-media-slide .cst-video-frame video{position:absolute;inset:0;width:100%;height:100%;border:0;background:#000;object-fit:contain;}
	/* На мобильных гарантируем, что по видео можно тапнуть (не перекрыто оверлеями). */
	.cst-media-slide .cst-video-frame video{z-index:1;pointer-events:auto;}
	.cst-media-nav{position:absolute;top:50%;transform:translateY(-50%);width:48px;height:48px;border:none;border-radius:50%;background:rgba(255,255,255,.92);color:#111;font-size:1.7rem;line-height:1;cursor:pointer;z-index:2;}
	.cst-media-prev{left:12px;}
	.cst-media-next{right:12px;}
	.cst-media-nav[hidden]{display:none;}
	.cst-media-dots{display:flex;gap:8px;justify-content:center;margin-top:14px;flex-wrap:wrap;}
	.cst-media-dot{width:10px;height:10px;border-radius:50%;border:none;background:rgba(255,255,255,.4);cursor:pointer;padding:0;}
	.cst-media-dot.is-active{background:#fff;}
	@media (max-width:600px){
		.cst-media-modal{padding:12px;}
		.cst-media-nav{width:40px;height:40px;font-size:1.4rem;}
	}
	@media (prefers-reduced-motion: reduce) { .cst-media-track { transition: none; } }
