/* Виджет Дербовеж — Новый год 2027. Все стили изолированы префиксом #dbz-ny-2027 */
#dbz-ny-2027 {
  --dbz-scale: .86;
  --dbz-scroll-y: 0px;
  --dbz-scroll-tilt: 0deg;
  position: fixed;
  z-index: 990;
  top: 86px;
  right: 20px;
  width: 293px;
  height: 267px;
  box-sizing: border-box;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, -18px, 0);
  transition: opacity .65s ease, transform .8s cubic-bezier(.18,.75,.2,1), visibility .65s;
}
#dbz-ny-2027.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0);
}
#dbz-ny-2027, #dbz-ny-2027 * { box-sizing: border-box; }
#dbz-ny-2027 .dbz-ny-stage {
  position: absolute;
  top: 0;
  right: 0;
  width: 340px;
  height: 310px;
  transform-origin: top right;
  transform: translate3d(0, var(--dbz-scroll-y), 0) scale(var(--dbz-scale));
  pointer-events: none;
}
#dbz-ny-2027 .dbz-ny-branch {
  position: absolute;
  inset: 0 auto auto 0;
  display: block;
  width: 340px;
  height: 301px;
  max-width: none;
  border: none;
  object-fit: fill;
  filter: drop-shadow(0 5px 7px rgba(0,0,0,.20));
}
#dbz-ny-2027 .dbz-ny-hanger {
  position: absolute;
  top: 55px;
  left: 105px;
  width: 147px;
  height: 246px;
  transform-origin: 51.6% 2%;
  transform: rotate(var(--dbz-scroll-tilt));
  transition: transform .28s ease-out;
}
#dbz-ny-2027 .dbz-ny-swing {
  width: 147px;
  height: 246px;
  transform-origin: 51.6% 2%;
  animation: dbz-ny-sway 5.3s ease-in-out infinite;
}
#dbz-ny-2027 .dbz-ny-ball-link {
  display: block;
  position: relative;
  width: 147px;
  height: 246px;
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}
#dbz-ny-2027 .dbz-ny-ball-img {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  width: 147px;
  height: 246px;
  max-width: none;
  border: none;
  filter: drop-shadow(0 8px 9px rgba(0,0,0,.28));
  transition: filter .25s ease;
}
#dbz-ny-2027 .dbz-ny-ball-link:hover .dbz-ny-ball-img,
#dbz-ny-2027 .dbz-ny-ball-link:focus-visible .dbz-ny-ball-img {
  filter: drop-shadow(0 9px 13px rgba(0,0,0,.38)) brightness(1.08);
}
#dbz-ny-2027 .dbz-ny-ball-copy {
  position: absolute;
  top: 113px;
  left: 11px;
  width: 124px;
  height: 125px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #fff7e5;
  font-family: Georgia, 'Times New Roman', serif;
  text-align: center;
  pointer-events: none;
  text-shadow: 0 2px 3px rgba(92,0,0,.8);
}
#dbz-ny-2027 .dbz-ny-ball-title {
  font-size: 18px;
  line-height: 1.1;
  font-weight: 700;
}
#dbz-ny-2027 .dbz-ny-ball-year {
  font-size: 33px;
  line-height: 1;
  color: #ffe1a2;
}
#dbz-ny-2027 .dbz-ny-ball-cta {
  display: inline-block;
  margin-top: 4px;
  padding: 6px 11px;
  border-radius: 20px;
  background: linear-gradient(180deg,#ffefbb,#efc56c);
  color: #64151b;
  font: 700 13px/1.15 Arial, Helvetica, sans-serif;
  text-shadow: none;
  box-shadow: 0 2px 5px rgba(0,0,0,.22);
}
#dbz-ny-2027 .dbz-ny-close {
  position: absolute;
  top: 7px;
  right: -6px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.40);
  border-radius: 50%;
  background: rgba(36,43,35,.72);
  color: #fff;
  font: 400 25px/1 Arial, Helvetica, sans-serif;
  box-shadow: 0 3px 12px rgba(0,0,0,.20);
  cursor: pointer;
  pointer-events: auto;
  transition: background .2s ease;
}
#dbz-ny-2027 .dbz-ny-close:hover { background: rgba(34,39,33,.94); }
#dbz-ny-2027 .dbz-ny-close:focus-visible,
#dbz-ny-2027 .dbz-ny-ball-link:focus-visible { outline: 3px solid #ffe1a2; outline-offset: 3px; }
@keyframes dbz-ny-sway {
  0%, 100% { transform: rotate(-1.3deg); }
  50% { transform: rotate(1.3deg); }
}
/* Планшеты и небольшие ноутбуки */
@media (max-width: 1023px) {
  #dbz-ny-2027 { --dbz-scale: .74; top: 75px; right: 15px; width: 252px; height: 230px; }
}
/* Телефоны: небольшая игрушка в верхнем правом углу, кнопка закрытия остается 36px */
@media (max-width: 600px) {
  #dbz-ny-2027 { --dbz-scale: .62; top: 67px; right: 12px; width: 211px; height: 193px; }
  #dbz-ny-2027 .dbz-ny-ball-title { font-size: 20px; }
  #dbz-ny-2027 .dbz-ny-ball-cta { font-size: 15px; }
  #dbz-ny-2027 .dbz-ny-close { top: 0; right: -4px; width: 38px; height: 38px; }
}
@media (max-width: 359px) {
  #dbz-ny-2027 { --dbz-scale: .54; top: 60px; right: 7px; width: 184px; height: 168px; }
}
/* На очень низких экранах не перекрываем слишком много контента */
@media (max-height: 560px) and (min-width: 601px) {
  #dbz-ny-2027 { --dbz-scale: .65; top: 56px; width: 221px; height: 202px; }
}
@media (prefers-reduced-motion: reduce) {
  #dbz-ny-2027, #dbz-ny-2027 .dbz-ny-hanger, #dbz-ny-2027 .dbz-ny-ball-img { transition: none; }
  #dbz-ny-2027 .dbz-ny-swing { animation: none; }
}
