/* 공통 이벤트 팝업 (자체 완결형) */
.tg-popup {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.tg-popup.is-open {
  opacity: 1;
  visibility: visible;
}

.tg-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 22, 18, 0.62);
  backdrop-filter: blur(2px);
}

.tg-popup__box {
  position: relative;
  width: min(94vw, 480px);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.tg-popup.is-open .tg-popup__box {
  transform: translateY(0) scale(1);
}

.tg-popup__x {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}
.tg-popup__x:hover {
  background: rgba(0, 0, 0, 0.65);
}

.tg-popup__viewport {
  position: relative;
  overflow: hidden;
}

.tg-popup__track {
  display: flex;
  width: 100%;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tg-popup__slide {
  flex: 0 0 100%;
  display: block;
  line-height: 0;
  aspect-ratio: 4 / 5;
}
.tg-popup__slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.tg-popup__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.82);
  color: #2b3524;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18);
  transition: background 0.2s ease;
}
.tg-popup__nav:hover {
  background: #fff;
}
.tg-popup__nav--prev {
  left: 10px;
}
.tg-popup__nav--next {
  right: 10px;
}

.tg-popup__dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  padding: 12px 0 4px;
}
.tg-popup__dot {
  width: 8px;
  height: 8px;
  border: none;
  border-radius: 9999px;
  background: #d8d3c8;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, width 0.2s ease;
}
.tg-popup__dot.is-active {
  width: 22px;
  background: #3e522d;
}

.tg-popup__footer {
  display: flex;
  border-top: 1px solid #ece7dd;
}
.tg-popup__footer button {
  flex: 1;
  padding: 14px 8px;
  border: none;
  background: #fff;
  color: #5a6354;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.tg-popup__footer .tg-popup__today {
  border-right: 1px solid #ece7dd;
}
.tg-popup__footer button:hover {
  background: #f6f4ee;
}
.tg-popup__footer .tg-popup__close {
  color: #3e522d;
}

@media (max-width: 480px) {
  .tg-popup__box {
    width: 92vw;
  }
  .tg-popup__nav {
    width: 34px;
    height: 34px;
    font-size: 20px;
  }
}
