/* =====================================================================
   VIDEO PAGE (fullstory.tpl)
   Подключается в main.tpl только на странице полной новости.
   ===================================================================== */

.pg {
	--pg-ai1: #7c3aed;              /* фиолетовый для AI-элементов */
	--pg-ai2: #c026d3;              /* пурпурный */
	--pg-hot: #ff3d6e;              /* розово-красный для акцентов */
	--pg-strip: var(--bg-strip, #211b2d); /* фон полосок (как у заголовка) */
	--pg-vert-ratio: 10 / 9;        /* высота плеера для вертикальных видео на телефоне: 10/9 ≈ +60%, 4/3 ≈ +33%, 1/1 — квадрат */
}
.pg button, .pgs button {font: inherit; line-height: 1; letter-spacing: normal; text-transform: none;
	min-width: 0; margin: 0; box-shadow: none;}
.pg svg, .pgs svg {display: block; flex: none;}
[hidden] {display: none !important;}


/* ---------- Player ---------- */
.pg .v-lite {position: relative; aspect-ratio: 16/9; background: #000; cursor: pointer; overflow: hidden;
	margin: 0 0 12px; border-radius: 10px;}
.pg .v-lite img, .pg .v-lite iframe {position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0;}
.pg .v-lite__play {position: absolute; inset: 0; margin: auto; width: 72px; height: 50px; padding: 0; border: 0;
	border-radius: 14px; background: rgba(0,0,0,.65); cursor: pointer; transition: background-color .2s, transform .2s;}
.pg .v-lite__play::before {content: ""; position: absolute; inset: 0; margin: auto; width: 0; height: 0;
	border-style: solid; border-width: 11px 0 11px 19px; border-color: transparent transparent transparent #fff; transform: translateX(2px);}
.pg .v-lite:hover .v-lite__play {background: var(--grad); transform: scale(1.06); box-shadow: 0 10px 30px -6px rgba(192,38,211,0.7);}
/* Вертикальные видео: превью целиком + размытый фон по бокам */
.pg .v-lite .v-lite__bg {transform: scale(1.15); filter: blur(18px) brightness(.55) saturate(1.2); pointer-events: none;}
.pg-video.is-vertical .v-lite img:not(.v-lite__bg) {object-fit: contain;}
/* The site's dark theme sets color-scheme: dark; Chrome then paints an iframe with a "light" page (Bunny player) on an opaque WHITE canvas.
   color-scheme: normal on the iframe keeps it transparent: black behind horizontal videos, the blurred copy behind vertical ones. */
.pg .v-lite iframe {color-scheme: normal; background: transparent;}
.pg .v-lite__start {position: absolute; left: 10px; bottom: 10px; z-index: 2; padding: 5px 10px; border-radius: 999px;
	background: rgba(0,0,0,.7); color: #fff; font-size: 12px; font-weight: 700; pointer-events: none;}


/* ---------- Strips (toolbar, AI row, footer) ---------- */
.pg-bar {display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin: 0 -15px; padding: 10px 15px;
	border-top: 1px solid var(--bdc);}

/* Toolbar */
.pg-q {display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; font-size: 15px; font-weight: 700; white-space: nowrap;}
.pg-q__label {color: var(--tt-l);}
.pg-q i {font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .04em; padding: 3px 5px;
	border-radius: 4px; background: var(--grad); color: #fff;}
.pg-q i:empty {display: none;}

.pg-btn {display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border: 0; border-radius: 16px;
	font-size: 13px; font-weight: 700; color: #fff; cursor: pointer; white-space: nowrap;
	transition: transform .15s, box-shadow .2s, background-color .2s, filter .2s;}
.pg-btn svg {width: 15px; height: 15px;}
.pg-btn--dl {background: var(--grad);}
.pg-btn--dl:hover {background: var(--grad-hover); transform: translateY(-1px); box-shadow: var(--glow);}
.pg-btn--dl .pg-btn__chev {transition: transform .25s;}
.pg-btn--dl[aria-expanded="true"] .pg-btn__chev {transform: rotate(180deg);}
.pg-btn--share {background: var(--bg-d, rgba(255,255,255,.08)); color: var(--tt); box-shadow: inset 0 0 0 1px var(--bdc);}
.pg .pg-btn--share:hover {background-image: none; color: var(--tt); box-shadow: inset 0 0 0 1px var(--accent); transform: translateY(-1px);}
/* "Generate with this prompt": a little brighter than Copy prompt, calmer than the gradient buttons */
.pg-btn--soft {background: var(--accent-soft, rgba(168,85,247,.14)); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-ring, rgba(168,85,247,.45));}
.pg .pg-btn--soft:hover {background: var(--grad); color: #fff; box-shadow: var(--glow); transform: translateY(-1px);}

.pg-report {margin-left: auto;}
/* Admin only: "Edit #ID" next to Report (amber, so it never looks like part of the site for visitors) */
.pg-admin {margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px;
	font-size: 12.5px; font-weight: 700; color: #fbbf24; background: rgba(251,191,36,.1); box-shadow: inset 0 0 0 1px rgba(251,191,36,.45);
	transition: background-color .2s, color .2s;}
.pg-admin:hover {color: #1a1205; background: #fbbf24;}
.pg-admin[hidden] {display: none;}
.pg-admin svg {width: 14px; height: 14px;}
.pg-admin:not([hidden]) + .pg-report {margin-left: 0;}
.pg-report a {display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
	font-size: 17px; color: var(--tt-3); transition: color .2s, background-color .2s;}
.pg-report a:hover {color: var(--accent); background: var(--bg-d, rgba(255,255,255,.08));}

/* Download panel (выезжает вниз) */
.pg-dl {display: grid; grid-template-rows: 0fr; margin: 0 -15px; background: var(--pg-strip); transition: grid-template-rows .3s ease;}
.pg-dl.is-open {grid-template-rows: 1fr;}
.pg-dl__in {min-height: 0; overflow: hidden;}
.pg-dl__list {display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 8px; padding: 12px 15px;
	border-top: 1px solid var(--bdc); opacity: 0; transform: translateY(-6px); transition: opacity .25s, transform .3s;}
.pg-dl.is-open .pg-dl__list {opacity: 1; transform: none;}
.pg-dl__item {display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 12px; border-radius: 10px;
	background: var(--bg-4); box-shadow: inset 0 0 0 1px var(--bdc); color: var(--tt) !important; text-decoration: none !important;
	transition: box-shadow .2s, transform .15s;}
.pg-dl__item:hover {box-shadow: inset 0 0 0 1px var(--pg-ai2), 0 6px 16px rgba(0,0,0,.25); transform: translateY(-1px);}
.pg-dl__txt {display: flex; flex-direction: column; gap: 3px; min-width: 0;}
.pg-dl__txt b {font-size: 16px; font-weight: 800; line-height: 1;}
.pg-dl__txt small {font-size: 12px; color: var(--tt-3); white-space: nowrap;}
.pg-dl__ico {margin-left: auto; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
	color: #fff; background: var(--grad);}
.pg-dl__ico svg {width: 16px; height: 16px;}

/* AI model row */
.pg-ai {position: relative; z-index: 5; background: var(--pg-strip); gap: 8px;}
.pg-ai__label {display: inline-flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 700;}
.pg-ai__label svg {width: 18px; height: 18px; color: var(--pg-ai2);}
.pg-chip {display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border-radius: 6px; white-space: nowrap;
	background: var(--bg-4); box-shadow: inset 0 0 0 1px var(--bdc); font-size: 13px; font-weight: 700;}
.pg-ai__plus {font-weight: 800; color: var(--tt-3);}
.pg-aimod {position: relative; display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 6px;
	background: linear-gradient(135deg, #c026d3, #db2777); color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .05em;
	cursor: help; outline: 0; user-select: none;}
.pg-aimod:focus-visible {box-shadow: 0 0 0 2px var(--tt);}
.pg-aimod__card {position: absolute; left: 50%; top: calc(100% + 10px); width: 230px; margin-left: -115px; padding: 10px;
	border-radius: 10px; background: var(--bg-4); color: var(--tt); box-shadow: var(--bsh, 0 12px 30px rgba(0,0,0,.45)), 0 0 0 1px var(--bdc);
	font-weight: 400; letter-spacing: 0; cursor: default;
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s, transform .2s, visibility .2s;}
.pg-aimod__card::before {content: ""; position: absolute; left: 50%; top: -6px; width: 12px; height: 12px; margin-left: -6px;
	background: inherit; transform: rotate(45deg); box-shadow: -1px -1px 0 var(--bdc);}
.pg-aimod:hover .pg-aimod__card, .pg-aimod:focus .pg-aimod__card, .pg-aimod.is-open .pg-aimod__card
{opacity: 1; visibility: visible; transform: none;}
.pg-aimod__card img {position: relative; display: block; width: 100%; height: auto; border-radius: 6px; margin-bottom: 8px;}
.pg-aimod__card b {display: block; font-size: 14px; font-weight: 800; margin-bottom: 4px;}
.pg-aimod__card span {display: block; font-size: 12px; line-height: 1.45; color: var(--tt-l);}


/* ---------- Generate Similar (переливающаяся полоса) ---------- */
.pg-gen {position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: 12px;
	margin: 0 -15px; padding: 9px 15px; background: #5a1f35; color: #fff !important; text-decoration: none !important;
	box-shadow: inset 0 1px 0 rgba(255,255,255,.06), inset 0 -1px 0 rgba(0,0,0,.25);}
.pg-gen::before {content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 400%; z-index: -1;
	background: linear-gradient(90deg, #5a1f35 0%, #721d4c 18%, #62206d 36%, #4b2a8c 52%, #6b1f6a 70%, #7a1f45 86%, #5a1f35 100%);
	animation: pgGenShift 14s ease-in-out infinite alternate;}
@keyframes pgGenShift {to {transform: translateX(-75%);}}

.pg-gen__arrow {width: 22px; height: 22px; opacity: .55; animation: pgNudge 2.4s ease-in-out infinite;}
@keyframes pgNudge {50% {transform: translateX(3px);}}

.pg-gen__pill {display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 13px; border-radius: 8px;
	background: rgba(0,0,0,.3); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
	color: #ffe08a; font-size: 15px; font-weight: 800; white-space: nowrap;}
.pg-gen__spark {width: 18px; height: 18px; color: #ffd54a; animation: pgTwinkle 2.2s ease-in-out infinite;}
@keyframes pgTwinkle {50% {transform: scale(.78) rotate(18deg); opacity: .7;}}

.pg-gen__start {position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px; height: 34px;
	padding: 0 16px; border-radius: 8px; background: rgba(255,255,255,.12); font-size: 14px; font-weight: 800;
	letter-spacing: .08em; white-space: nowrap;
	transition: background-color .3s, box-shadow .3s, letter-spacing .3s, transform .2s;}
.pg-gen__start svg {width: 11px; height: 11px; transition: transform .3s;}
.pg-gen__start::before {content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
	background: linear-gradient(90deg, var(--pg-hot), #a64bff); transition: opacity .3s;}
.pg-gen__start::after {content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-20deg);
	animation: pgShine 3.6s ease-in-out infinite;}
@keyframes pgShine {0%, 55% {left: -60%;} 100% {left: 130%;}}
.pg-gen__start {z-index: 0;}
.pg-gen:hover .pg-gen__start, .pg-gen:focus-visible .pg-gen__start {letter-spacing: .16em; transform: scale(1.04);
	box-shadow: 0 0 0 1px rgba(255,255,255,.25), 0 6px 22px rgba(255,61,110,.5);}
.pg-gen:hover .pg-gen__start::before, .pg-gen:focus-visible .pg-gen__start::before {opacity: 1;}
.pg-gen:hover .pg-gen__start svg {transform: translateX(3px) scale(1.15);}
.pg-gen:active .pg-gen__start {transform: scale(.97);}
.pg-gen__note {margin-left: auto; font-size: 13px; color: rgba(255,255,255,.7); white-space: nowrap;}

@media (prefers-reduced-motion: reduce) {
	.pg-gen::before, .pg-gen__arrow, .pg-gen__spark, .pg-gen__start::after {animation: none;}
}


/* ---------- Sections: scenes, description ---------- */
.pg-sec {padding-top: 18px;}
.pg-sec__head {display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 10px;}
.pg-sec__title {display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; font-weight: 700; color: var(--tt); text-transform: none;}
.pg-sec__title svg {width: 19px; height: 19px; color: var(--accent);}
.pg-hint {font-size: 12px; color: var(--tt-3);}
.pg-hint--touch {display: none;}
@media (hover: none) {.pg-hint--mouse {display: none;} .pg-hint--touch {display: inline;}}

.vframes {display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;}
.vframe {position: relative; display: block; aspect-ratio: 16/9; overflow: hidden; background: #000; border-radius: 6px;
	transition: box-shadow .2s;}
.vframe img {display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s, filter .25s;}
.vframe span {position: absolute; right: 4px; bottom: 4px; z-index: 2; padding: 1px 5px; border-radius: 3px;
	background: rgba(0,0,0,.75); color: #fff; font-size: 12px; line-height: 1.4;}
.vframe span:empty {display: none;}
.vframe::after {content: ""; position: absolute; left: 50%; top: 50%; z-index: 1; width: 34px; height: 34px; margin: -17px 0 0 -17px;
	border-radius: 50%; opacity: 0; transform: scale(.7); transition: opacity .2s, transform .2s;
	background: rgba(0,0,0,.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z' fill='%23fff'/%3E%3C/svg%3E") 55% 50% / 14px no-repeat;}
.vframe:hover {box-shadow: 0 0 0 2px var(--accent);}
.vframe:hover img {transform: scale(1.06); filter: brightness(.85);}
.vframe:hover::after {opacity: 1; transform: none;}

.pg-desc__text {font-size: 14px; line-height: 1.65;}

/* Chapters */
.pg-chapters:not(.is-ready), .pg-moments:not(.is-ready) {font-size: 14px; line-height: 1.8; color: var(--tt-l);}
.pg-chapters__list {display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none;}
.pg-chap {display: flex; align-items: center; gap: 10px; height: 100%; padding: 8px 10px; border-radius: 10px;
	background: var(--pg-strip); box-shadow: inset 0 0 0 1px var(--bdc); color: var(--tt) !important; text-decoration: none !important;
	transition: box-shadow .2s, background-color .2s, transform .15s;}
.pg-chap:hover {box-shadow: inset 0 0 0 1px var(--accent-ring); transform: translateY(-1px);}
.pg-chap.is-active {background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent);}
.pg-chap__time {flex: none; min-width: 50px; padding: 3px 7px; border-radius: 6px; background: var(--grad); color: #fff;
	font-size: 12px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums;}
.pg-chap__title {font-size: 14px; font-weight: 600; line-height: 1.3;}

/* Key moments */
.pg-moments__list {display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none;}
.pg-moment {display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 13px 0 4px; border-radius: 17px;
	background: var(--bg-d, rgba(255,255,255,.06)); color: var(--tt) !important; font-size: 13px; font-weight: 600;
	text-decoration: none !important; transition: background-color .2s, color .2s;}
.pg-moment b {padding: 4px 9px; border-radius: 13px; background: var(--accent-soft); color: var(--accent);
	font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; transition: inherit;}
.pg-moment:hover {background: var(--grad); color: #fff !important;}
.pg-moment:hover b {background: rgba(255,255,255,.2); color: #fff;}

/* AI Prompt */
.pg-prompt__box {position: relative; overflow: hidden; padding: 14px 16px 14px 19px; border-radius: 12px;
	background: var(--pg-strip); box-shadow: inset 0 0 0 1px var(--bdc);}
.pg-prompt__box::before {content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, #7c3aed, #c026d3);}
.pg-prompt__text {margin: 0 0 12px; font-size: 14px; line-height: 1.65; color: var(--tt);}
.pg-prompt__actions {display: flex; flex-wrap: wrap; gap: 8px;}
.pg-prompt__actions .pg-btn {text-decoration: none;}

/* Info + tags */
.pg-info {display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-top: 16px; font-size: 13px; color: var(--tt-3);}
.pg-info > span {display: inline-flex; align-items: center; gap: 6px;}
.pg-info svg {width: 15px; height: 15px;}
.pg-info__cat {display: inline;}
.pg-info a {color: var(--tt);}
.pg-info a:hover {color: var(--accent);}
.pg-tags {display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; font-size: 0;}
/* Categories + tags as chips. font-size: 0 hides the separators DLE puts between links (", " etc.) */
.pg-tax {margin-top: 14px; font-size: 0; line-height: 0;}
.pg-tax a {display: inline-flex; align-items: center; height: 28px; margin: 0 6px 6px 0; padding: 0 12px; border-radius: 14px;
	font-size: 13px; line-height: 1; font-weight: 600; vertical-align: top; white-space: nowrap;
	transition: background-color .2s, color .2s, box-shadow .2s;}
.pg-tax__cats a {color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-ring);}
.pg-tax__cats a::before {content: ''; width: 14px; height: 14px; margin-right: 6px; flex: 0 0 auto; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3C/svg%3E") center / contain no-repeat;}
.pg-tax__cats a:hover {background: var(--grad); color: #fff; box-shadow: none;}
.pg-tax .pg-tags {display: inline; margin: 0;}
.pg-tax .pg-tags a {height: 28px; padding: 0 11px; font-size: 13px; font-weight: 500; color: var(--tt); background: var(--bg-d, rgba(255,255,255,.08)); box-shadow: none;}
.pg-tax .pg-tags a::before {content: "#"; opacity: .5; margin-right: 1px;}
.pg-tax .pg-tags a:hover {background: var(--grad); color: #fff;}
.pg-tags a {display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border-radius: 13px; font-size: 12px; font-weight: 500;
	background: var(--bg-d, rgba(255,255,255,.08)); color: var(--tt); transition: background-color .2s, color .2s;}
.pg-tags a::before {content: "#"; opacity: .5; margin-right: 1px;}
.pg-tags a:hover {background: var(--grad); color: #fff;}

/* Footer strip: rating + favorites */
.pg-foot {justify-content: space-between; margin-top: 18px; margin-bottom: -15px; background: var(--pg-strip);}
.pg-fav {display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 10px; margin-left: auto;
	font-size: 13px; font-weight: 700; cursor: pointer; gap: 8px; white-space: nowrap;}
.pg-fav a {display: inline-flex; align-items: center; gap: 8px; height: 100%; color: inherit;}


/* ---------- Adaptive ---------- */
@media (max-width: 900px) {
	.pg-gen__note {display: none;}
}
@media (max-width: 767px) {
	.vframes {grid-template-columns: repeat(3, 1fr); gap: 6px;}
	.vframe {border-radius: 4px;}
	.vframe:nth-child(3), .vframe:nth-child(6), .vframe:nth-child(10) {display: none;}
	.vframe span {right: 3px; bottom: 3px; padding: 0 4px; font-size: 10px;}
}
@media (max-width: 590px) {
	.pg .v-lite {margin: 0 -15px; border-radius: 0;}
	.pg-video.is-vertical .v-lite {aspect-ratio: var(--pg-vert-ratio);}
	.pg-bar, .pg-gen {padding-top: 9px; padding-bottom: 9px;}
	.pg-gen {gap: 8px;}
	.pg-gen__pill {font-size: 14px; padding: 0 10px; height: 32px;}
	.pg-gen__start {height: 32px; padding: 0 13px;}
	.pg-sec__title {font-size: 16px;}
}
@media (max-width: 480px) {
	.pg-tools {gap: 8px;}
	.pg-q__label {display: none;}
	.pg-btn {padding: 0 11px; gap: 5px;}
	.pg-report a {width: 30px;}
}
@media (max-width: 360px) {
	.pg-gen__arrow, .pg-q i, .pg-btn__chev {display: none;}
}


/* =====================================================================
   SHARE DIALOG (как у YouTube). На телефоне — выезжает снизу.
   ===================================================================== */
.pgs {position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 12px;}
.pgs__backdrop {position: absolute; inset: 0; background: rgba(0,0,0,.6); opacity: 0; transition: opacity .2s;}
.pgs.is-open .pgs__backdrop {opacity: 1;}
.pgs__dialog {position: relative; width: 540px; max-width: 100%; max-height: calc(100vh - 24px); overflow-y: auto;
	padding: 16px 22px 20px; border-radius: 18px; background: var(--ui-bg, #1a1624); color: var(--tt, #fff);
	box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 0 1px var(--bdc);
	opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .2s, transform .25s;}
.pgs.is-open .pgs__dialog {opacity: 1; transform: none;}
body.pgs-lock {overflow: hidden;}

.pgs__head {display: flex; align-items: center; gap: 6px; margin-bottom: 16px;}
.pgs__title {flex: 1; font-size: 18px; font-weight: 700;}
.pgs__icon-btn {display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%;
	background: transparent; color: var(--tt, #fff); cursor: pointer; transition: background-color .2s;}
.pgs .pgs__icon-btn:hover {background: var(--bg-d, rgba(255,255,255,.1)); box-shadow: none;}
.pgs__icon-btn svg {width: 22px; height: 22px;}
.pgs__icon-btn[data-back] {margin-left: -8px;}

.pgs__row-wrap {position: relative;}
.pgs__row {display: flex; gap: 4px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
	-webkit-overflow-scrolling: touch; padding: 2px 0 4px;}
.pgs__row::-webkit-scrollbar {display: none;}
.pgs .pgs__app {flex: none; width: 78px; height: auto; display: flex; flex-direction: column; align-items: center;
	justify-content: flex-start; gap: 8px; padding: 2px 0; border: 0; border-radius: 0; background: none;
	color: var(--tt, #fff) !important; font-size: 12px; font-weight: 400; text-align: center;
	text-decoration: none !important; cursor: pointer; scroll-snap-align: start;}
.pgs__app i {display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: #4b5563;
	color: #fff; transition: transform .15s, filter .15s;}
.pgs__app:hover i {transform: translateY(-2px); filter: brightness(1.12);}
.pgs__app img {width: 28px; height: 28px; filter: brightness(0) invert(1);}
.pgs__app svg {width: 26px; height: 26px;}
.pgs__app--embed i {background: #f1f1f1; color: #111;}
.pgs__app--wa i {background: #25d366;}
.pgs__app--fb i {background: #1877f2;}
.pgs__app--x i {background: #000; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);}
.pgs__app--tg i {background: #229ed9;}
.pgs__app--rd i {background: #ff4500;}
.pgs__app--mail i {background: #6b7280;}
.pgs__app--more i {background: #374151;}

.pgs__nav {position: absolute; top: 12px; z-index: 2; display: none; place-items: center; width: 40px; height: 40px;
	padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: var(--bg-strip, #211b2d); color: var(--tt, #fff);
	box-shadow: 0 2px 10px rgba(0,0,0,.45);}
.pgs__nav svg {width: 20px; height: 20px;}
.pgs__nav--prev {left: -8px;}
.pgs__nav--next {right: -8px;}
.pgs__row-wrap.has-prev .pgs__nav--prev, .pgs__row-wrap.has-next .pgs__nav--next {display: grid;}
@media (hover: none) {.pgs__row-wrap .pgs__nav {display: none !important;}} /* на телефоне листают пальцем */

.pgs__link {display: flex; align-items: center; gap: 8px; margin-top: 18px; padding: 6px 6px 6px 14px; border-radius: 12px;
	background: var(--input-bg, #120f19); box-shadow: inset 0 0 0 1px var(--input-bd);}
.pgs__link input {flex: 1; min-width: 0; height: 36px; padding: 0; border: 0; border-radius: 0; background: transparent;
	box-shadow: none; color: var(--tt, #fff); font-size: 14px; text-overflow: ellipsis; outline: 0;}
.pgs__copy {height: 36px; padding: 0 18px; border: 0; border-radius: 18px; cursor: pointer; white-space: nowrap;
	background: var(--grad); color: #fff; font-size: 14px; font-weight: 700; transition: background-color .2s, transform .15s;}
.pgs__copy:hover {background: var(--grad-hover); transform: translateY(-1px); box-shadow: var(--glow);}
.pgs .pgs__copy.is-done {background: #16a34a;}

.pgs__embed-cap {margin: 0 0 10px; font-size: 14px; color: var(--tt-l, #ccc);}
.pgs__code {display: block; width: 100%; height: 132px; padding: 12px; resize: none; border: 0; border-radius: 10px;
	background: var(--input-bg, #120f19); color: var(--tt, #fff); box-shadow: inset 0 0 0 1px var(--input-bd); outline: 0;
	font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all;}
.pgs__embed-actions {display: flex; justify-content: flex-end; margin-top: 10px;}

.pgs__start {display: flex; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px;
	border-top: 1px solid var(--bdc); font-size: 14px; cursor: pointer;}
.pgs__start input[type="checkbox"] {width: 18px; height: 18px; margin: 0; accent-color: #a855f7; cursor: pointer;}
.pgs__time {width: 76px; height: 30px; padding: 0 8px; border: 0; border-radius: 8px; background: var(--input-bg, #120f19);
	color: var(--tt, #fff); box-shadow: inset 0 0 0 1px var(--bdc); font-size: 14px; outline: 0;}
.pgs__time:disabled {opacity: .55;}

@media (max-width: 590px) {
	.pgs {align-items: flex-end; padding: 0;}
	.pgs__dialog {width: 100%; max-height: 88vh; border-radius: 16px 16px 0 0;
		padding: 22px 16px calc(18px + env(safe-area-inset-bottom)); transform: translateY(100%);}
	.pgs__dialog::before {content: ""; position: absolute; left: 50%; top: 8px; width: 40px; height: 4px; margin-left: -20px;
		border-radius: 2px; background: var(--tt-3, #888); opacity: .5;}
	.pgs.is-open .pgs__dialog {transform: none;}
	.pgs__row {margin: 0 -16px; padding: 2px 16px 4px; scroll-padding: 0 16px;}
	.pgs .pgs__app {width: 72px;}
	.pgs__app i {width: 56px; height: 56px;}
}
