/* =========================
   popup v2
   - mobile / tablet+pc
   - draggable header
   - no internal scroll
   - dim click closes all
========================= */

.popv2 {
  position: relative;
  z-index: 9999;
}

.popv2__dim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  z-index: 9998;
}

.popv2__stack {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}

.popv2__item {
  --popv2-left: 16px;
  --popv2-top: 16px;
  --popv2-width: 360px;
  --popv2-z: 1001;

  position: fixed;
  left: var(--popv2-left);
  top: var(--popv2-top);
  width: var(--popv2-width);
  max-width: calc(100vw - 24px);
  pointer-events: auto;
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  border: 0px solid black;
  z-index: var(--popv2-z);
  user-select: none;
}

.popv2__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 12px 14px;
  background: #23262d;
  color: #ffffff;
  cursor: grab;
  touch-action: none;
}

.popv2__head.is-dragging {
  cursor: grabbing;
}

.popv2__title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  word-break: keep-all;
}

.popv2__close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  position: relative;
  opacity: 0.88;
}

.popv2__close::before,
.popv2__close::after {
  content: "";
  position: absolute;
  top: 13px;
  left: 5px;
  width: 18px;
  height: 1.5px;
  background: currentColor;
}

.popv2__close::before {
  transform: rotate(45deg);
}

.popv2__close::after {
  transform: rotate(-45deg);
}

.popv2__close:hover {
  opacity: 1;
}

.popv2__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.popv2__media {
  margin: 0;
  padding: 0;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: none;
}

.popv2__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.popv2__foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 12px 14px 14px;
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.popv2__hide {
  border: 0;
  background: transparent;
  padding: 2px 0;
  margin: 0;
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  color: #666666;
  cursor: pointer;
}

.popv2__hide:hover {
  color: #111111;
}

@media (max-width: 767px) {
  .popv2__item {
    border-radius: 16px;
  }

  .popv2__head {
    min-height: 46px;
    padding: 3px 13px;
  }

  .popv2__title {
    font-size: 14px;
  }

  .popv2__foot {
    padding: 3px 13px 3px;
  }

  .popv2__hide {
    font-size: 12px;
  }
}
