.ytp-popup[hidden] { display: none !important; }
.ytp-popup { position: fixed; inset: 0; z-index: 999999; display: grid; place-items: center; padding: clamp(14px, 3vw, 36px); box-sizing: border-box; }
.ytp-popup *, .ytp-popup *::before, .ytp-popup *::after { box-sizing: border-box; }
.ytp-popup__overlay { position: absolute; inset: 0; background: rgba(5, 15, 35, var(--ytp-overlay, .72)); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.ytp-popup__dialog { position: relative; width: min(94vw, var(--ytp-max-width, 1100px)); max-height: 90vh; border-radius: clamp(12px, 2vw, 22px); background: #fff; box-shadow: 0 26px 80px rgba(0, 27, 73, .34); animation: ytp-in .32s cubic-bezier(.2,.8,.2,1); }
.ytp-popup__link, .ytp-popup picture { display: block; }
.ytp-popup__image { display: block; width: 100%; height: auto; max-height: 88vh; object-fit: contain; border-radius: inherit; }
.ytp-popup__close { position: absolute; z-index: 2; top: -14px; right: -14px; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 3px solid #fff; border-radius: 999px; background: #e21b22; color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.24); font: 700 30px/1 Arial, sans-serif; cursor: pointer; transition: transform .18s ease, background .18s ease; }
.ytp-popup__close:hover { background: #bb1017; transform: scale(1.06); }
.ytp-popup__close:focus-visible { outline: 3px solid #ffda44; outline-offset: 3px; }
body.ytp-popup-open { overflow: hidden !important; }
@keyframes ytp-in { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 600px) {
	.ytp-popup { padding: 12px; }
	.ytp-popup__dialog { width: min(94vw, var(--ytp-max-width, 1100px)); border-radius: 14px; }
	.ytp-popup__close { top: -10px; right: -8px; width: 38px; height: 38px; font-size: 27px; }
}
@media (prefers-reduced-motion: reduce) { .ytp-popup__dialog { animation: none; } }

