.elw-popup, .elw-popup * { box-sizing: border-box; }
.elw-popup[hidden] { display: none !important; }
.elw-popup {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  padding: 28px 14px;
  background: rgba(15, 18, 24, .56);
  animation: elw-fade-in .25s ease-out both;
}
.elw-popup__dialog {
  position: relative;
  width: min(92vw, 796px);
  max-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
.elw-popup__close {
  position: absolute;
  z-index: 2;
  top: 2px;
  right: 2px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 50%;
  color: #fff;
  background: rgba(22, 25, 30, .74);
  font: 400 28px/1 Arial, sans-serif;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,.22);
}
.elw-popup__close:hover, .elw-popup__close:focus-visible { background: #e1011b; outline: 2px solid #fff; outline-offset: 2px; }
.elw-popup__swing {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: 50% 10px;
  animation: elw-swing 4.2s ease-in-out infinite;
  filter: drop-shadow(0 16px 22px rgba(0,0,0,.26));
}
.elw-popup__ornament {
  display: block;
  width: clamp(104px, 20vw, 190px);
  height: auto;
  margin: 0;
  object-fit: contain;
}
.elw-popup__thread {
  width: 2px;
  height: clamp(18px, 3vh, 30px);
  margin-top: -2px;
  background: linear-gradient(90deg, #9a6822, #f1d291 48%, #a36c20);
  box-shadow: 0 0 1px rgba(76, 49, 14, .8);
}
.elw-popup__gif {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  border: 0;
  background: #fff;
  box-shadow: 0 5px 16px rgba(0,0,0,.14);
}
@keyframes elw-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes elw-swing {
  0%, 100% { transform: rotate(0deg); }
  18% { transform: rotate(4.6deg); }
  38% { transform: rotate(-3.8deg); }
  58% { transform: rotate(2.6deg); }
  78% { transform: rotate(-1.3deg); }
}
@media (max-width: 480px) {
  .elw-popup { padding: 20px 10px; }
  .elw-popup__dialog { width: min(96vw, 796px); }
  .elw-popup__close { top: -42px; right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .elw-popup { animation: none; }
  .elw-popup__swing { animation: none; }
}
