.phg-player {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 16px;
	background: #070912;
}

.phg-player iframe,
.phg-player video,
.phg-modal__player iframe,
.phg-modal__player video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.phg-player .phg-player__poster,
.phg-player .phg-player__poster:hover,
.phg-player .phg-player__poster:focus,
.phg-player .phg-player__poster:active {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: #fff;
	cursor: pointer;
}

.phg-player__img,
.phg-player__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.phg-player__placeholder {
	background: var(--phg-placeholder, radial-gradient(circle at 78% 22%, rgba(255, 240, 116, 0.55), rgba(255, 240, 116, 0) 58%), #9c2e12);
}

.phg-player__poster::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(7, 9, 18, 0) 50%, rgba(7, 9, 18, 0.45));
}

.phg-player__play {
	position: absolute;
	z-index: 1;
	top: 50%;
	left: 50%;
	width: clamp(64px, 9vw, 92px);
	aspect-ratio: 1;
	border-radius: 50%;
	background: rgba(7, 9, 18, 0.6);
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 12px 40px rgba(0, 0, 0, 0.35);
	transform: translate(-50%, -50%);
	backdrop-filter: blur(6px);
}

.phg-player__play::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 54%;
	width: 32%;
	height: 38%;
	background: #fff;
	clip-path: polygon(0 0, 100% 50%, 0 100%);
	transform: translate(-50%, -50%);
}

.phg-player--empty .phg-player__note {
	position: absolute;
	z-index: 1;
	left: 50%;
	bottom: 20px;
	transform: translateX(-50%);
	padding: 8px 16px;
	border-radius: 999px;
	background: rgba(7, 9, 18, 0.65);
	color: #fff;
	font: 600 14px/1.3 system-ui, sans-serif;
	white-space: nowrap;
}

html.phg-modal-open {
	overflow: hidden;
}

.phg-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(4, 5, 12, 0.88);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s, visibility 0.2s;
	box-sizing: border-box;
}

.phg-modal.is-open {
	opacity: 1;
	visibility: visible;
}

.phg-modal__dialog {
	position: relative;
	width: min(1100px, 100%, calc((100vh - 160px) * 16 / 9));
	min-width: min(320px, 100%);
}

.phg-modal__player {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 14px;
	background: #000;
	box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}

.phg-modal .phg-modal__close,
.phg-modal .phg-modal__close:hover,
.phg-modal .phg-modal__close:focus,
.phg-modal .phg-modal__close:active {
	position: absolute;
	top: -48px;
	right: 0;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font: 400 26px/40px system-ui, sans-serif;
	text-align: center;
	cursor: pointer;
}

.phg-modal__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 20px;
	margin-top: 14px;
	color: #fff;
	font-family: system-ui, sans-serif;
}

.phg-modal__title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
}

.phg-modal .phg-modal__link,
.phg-modal .phg-modal__link:hover,
.phg-modal .phg-modal__link:focus,
.phg-modal .phg-modal__link:visited {
	color: #ffb800;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}

.phg-modal .phg-modal__link::after {
	content: " \2192";
}

.phg-modal .phg-modal__link[hidden] {
	display: none;
}

@media (max-width: 600px) {
	.phg-modal {
		padding: 12px;
	}

	.phg-modal__dialog {
		width: 100%;
	}

	.phg-modal__title {
		font-size: 16px;
	}
}
