/* ===== Всплывающее окно «Наш Telegram» (#tg-pop) ===== */
.tgp { width: min(400px, calc(100vw - 32px)); max-height: none; margin: auto; padding: 0; border: 0; overflow: visible; color: #fff; background: transparent; }
.tgp::backdrop { background: rgb(5 8 18 / 0.600); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.tgp[open] { animation: tgp-in 0.550s cubic-bezier(0.180, 1.250, 0.400, 1); }
@keyframes tgp-in { from { transform: translateY(40px) scale(0.900); opacity: 0; } }

.tgp__card { position: relative; display: grid; justify-items: center; gap: 12px; margin-top: 70px; padding: 82px 22px 24px; border-radius: 28px; text-align: center;
  isolation: isolate; overflow: visible;
  background:
    radial-gradient(90% 60% at 50% -10%, rgb(255 255 255 / 0.350), transparent 60%),
    linear-gradient(165deg, #3cc2ff 0%, #1d9bf0 45%, #1269d6 100%);
  box-shadow: inset 0 0 0 1.500px rgb(255 255 255 / 0.350), inset 0 2px 0 rgb(255 255 255 / 0.450), 0 30px 70px -20px rgb(0 20 60 / 0.900), 0 0 80px -20px rgb(40 170 255 / 0.700); }
/* картинка выходит за верх карточки, поэтому круг рисуем отдельно поверх обрезки */
.tgp { --ava: 132px; }
.tgp__ava { position: absolute; left: 50%; top: calc(var(--ava) / -2); z-index: 2; width: var(--ava); height: var(--ava); translate: -50% 0; }
.tgp__ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 5px #fff, 0 14px 30px rgb(0 40 100 / 0.550);
  animation: tgp-bob 3.600s ease-in-out infinite; }
.tgp__plane { position: absolute; right: -2px; bottom: 4px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(160deg, #5fd3ff, #1d8fe8); box-shadow: 0 0 0 4px #fff, 0 8px 18px rgb(0 60 140 / 0.500); animation: tgp-plane 3.600s ease-in-out infinite; }
.tgp__plane svg { width: 24px; height: 24px; fill: #fff; translate: -1px 1px; }
@keyframes tgp-bob { 50% { translate: 0 -6px; } }
@keyframes tgp-plane { 50% { translate: 3px -9px; rotate: -10deg; } }

.tgp__x { position: absolute; top: 14px; right: 14px; z-index: 3; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 12px; cursor: pointer;
  background: rgb(255 255 255 / 0.220); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.350); transition: background-color 0.200s, rotate 0.250s; }
.tgp__x:hover { background: rgb(255 255 255 / 0.350); rotate: 90deg; }
.tgp__x svg { width: 18px; height: 18px; fill: #fff; }
.tgp__x:focus-visible, .tgp__go:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.tgp__title { max-width: 320px; margin: 4px 0 0; font: 900 24px/1.150 var(--font-title); letter-spacing: -0.010em; text-shadow: 0 2px 0 rgb(0 50 120 / 0.350); }
.tgp__text { max-width: 320px; margin: 0; font: 700 14px/1.400 var(--font-title); color: rgb(255 255 255 / 0.880); }
.tgp__tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 2px 0 4px; padding: 0; list-style: none; }
.tgp__tags li { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px 0 8px; border-radius: 99px;
  background: rgb(0 40 110 / 0.280); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.250); font: 800 12px/1 var(--font-title); }
.tgp__tags b { font-size: 14px; }

.tgp__go { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 9px; width: 100%; max-width: 300px; height: 54px;
  border-radius: 17px; text-decoration: none; background: linear-gradient(180deg, #fff, #e4f3ff); color: #0f6fd6; font: 900 16px/1 var(--font-title);
  box-shadow: inset 0 -3px 0 rgb(15 111 214 / 0.180), 0 10px 24px rgb(0 40 110 / 0.450); transition: transform 0.150s, filter 0.200s; }
.tgp__go:hover { filter: brightness(1.040); transform: translateY(-2px); }
.tgp__go:active { transform: translateY(1px); }
.tgp__go svg { width: 22px; height: 22px; fill: currentColor; }
/* блик, пробегающий по кнопке */
.tgp__go::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgb(255 255 255 / 0.900) 50%, transparent 65%) -200% 0 / 200% 100% no-repeat; animation: tgp-shine 3.200s ease-in-out 1s infinite; }
@keyframes tgp-shine { 40%, 100% { background-position: 200% 0; } }

/* волна внизу карточки (обрезается по краям карточки слоем .tgp__bg) */
.tgp__bg { position: absolute; inset: 0; z-index: -1; border-radius: inherit; overflow: hidden; pointer-events: none; }
.tgp__wave { position: absolute; left: -10%; right: -10%; bottom: -40px; height: 120px; border-radius: 50% 50% 0 0; pointer-events: none;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.180), rgb(255 255 255 / 0.040)); }
.tgp__wave::before { content: ""; position: absolute; left: 15%; right: -20%; top: 30px; height: 120px; border-radius: 50% 50% 0 0; background: rgb(0 50 140 / 0.220); }

@media (min-width: 768px) {
  .tgp { width: 440px; --ava: 150px; }
  .tgp__card { margin-top: 80px; padding: 92px 30px 28px; }
  .tgp__title { font-size: 27px; max-width: 360px; }
}
@media (prefers-reduced-motion: reduce) { .tgp[open], .tgp__ava img, .tgp__plane, .tgp__go::after { animation: none; } }
@media (max-width: 420px) { .tgp__tags { flex-wrap: nowrap; gap: 4px; } .tgp__tags li { height: 28px; padding: 0 8px 0 6px; gap: 4px; font-size: 11px; white-space: nowrap; } .tgp__tags b { font-size: 12px; } }
.tgp__tags img { flex: 0 0 auto; width: 20px; height: 20px; object-fit: contain; filter: drop-shadow(0 2px 3px rgb(0 30 90 / 0.450)); }
@media (max-width: 420px) { .tgp__tags img { width: 17px; height: 17px; } }

/* метки — три одинаковые стеклянные плитки в один ряд: крупный значок сверху, подпись снизу */
.tgp__tags { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 330px; margin: 4px 0 6px; flex-wrap: nowrap; }
.tgp__tags li { display: grid; justify-items: center; align-content: center; gap: 6px; height: auto; min-height: 76px; padding: 10px 4px 9px; border-radius: 16px; white-space: nowrap;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.240), rgb(255 255 255 / 0.080)); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.300), inset 0 1px 0 rgb(255 255 255 / 0.400), 0 6px 14px rgb(0 40 110 / 0.250);
  font: 800 12.500px/1 var(--font-title); color: #fff; text-shadow: 0 1px 0 rgb(0 50 120 / 0.350); transition: transform 0.200s; }
.tgp__tags li:hover { transform: translateY(-3px); }
.tgp__tags img { width: 36px; height: 36px; filter: drop-shadow(0 4px 6px rgb(0 30 90 / 0.450)); }
.tgp__tags li:nth-child(2) img { animation: tgp-gift 2.400s ease-in-out infinite; }
@keyframes tgp-gift { 50% { translate: 0 -3px; rotate: -6deg; } }
@media (max-width: 420px) { .tgp__tags { gap: 6px; } .tgp__tags li { min-height: 70px; padding: 9px 2px 8px; gap: 5px; font-size: 11.500px; } .tgp__tags img { width: 32px; height: 32px; } }
@media (prefers-reduced-motion: reduce) { .tgp__tags li:nth-child(2) img { animation: none; } }