/* GMR 메인 레이어 팝업: 모든 규칙은 전용 네임스페이스 안에서만 동작합니다. */
.gmr-popup[hidden],
.gmr-popup__backdrop[hidden] { display: none !important; }

.popup_box_bg.gmr-popup__backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: block;
  width: auto;
  height: auto;
  background: rgb(0 0 0 / 55%);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.gmr-popup {
  --gmr-popup-card-width: 500px;
  --gmr-popup-gap: 12px;
  --gmr-popup-radius: 12px;
  --gmr-popup-blue: #0587c9;
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: clamp(20px, 5vh, 64px) 24px;
  overflow-y: auto;
  pointer-events: none;
}

.gmr-popup,
.gmr-popup * { box-sizing: border-box; }

.gmr-popup__panel {
  width: min(calc(var(--gmr-popup-count) * var(--gmr-popup-card-width) + (var(--gmr-popup-count) - 1) * var(--gmr-popup-gap) + 24px), calc(100vw - 48px));
  max-width: 100%;
  padding: 12px;
  border-radius: 14px;
  background: rgb(23 23 23 / 50%);
  box-shadow: 0 18px 50px rgb(0 0 0 / 20%);
  pointer-events: auto;
}

.gmr-popup__list {
  display: grid;
  grid-template-columns: repeat(var(--gmr-popup-count), minmax(0, 1fr));
  gap: var(--gmr-popup-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.gmr-popup__item,
.gmr-popup__link,
.gmr-popup__image {
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0;
}

.gmr-popup__link {
  display: block;
  overflow: hidden;
  border-radius: var(--gmr-popup-radius);
  background: #08213b;
}

.gmr-popup__link img {
  width:100% !important;
  height:auto !important;
}

.gmr-popup__image {
  display: block;
  height: auto;
  border: 0;
  object-fit: cover;
}

.gmr-popup__controls {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 48px;
  padding-top: 10px;
  color: #fff;
}

.gmr-popup__today {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  margin: 0;
  color: #fff;
  font: 400 15px/1.4 Pretendard, "Noto Sans KR", sans-serif;
  cursor: pointer;
}

.gmr-popup__today input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  flex: none;
  margin: 0;
  border: 0;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.gmr-popup__today input:checked {
  border: 0;
  border-radius: 4px;
  background-color: var(--gmr-popup-blue);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m3.5 8 3 3 6-6'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 14px 14px;
}

.gmr-popup__today input:focus-visible {
  outline: 2px solid #ffd400;
  outline-offset: 2px;
}

.gmr-popup__line { height: 1px; flex: 1; background: rgb(255 255 255 / 30%); }

.gmr-popup__close {
  appearance: none;
  -webkit-appearance: none;
  width: 38px;
  height: 38px;
  flex: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  outline: 0;
  color: #fff;
  background: var(--gmr-popup-blue);
  box-shadow: none;
  font: 300 30px/1 Arial, sans-serif;
  text-align: center;
  cursor: pointer;
}

.gmr-popup__close:focus,
.gmr-popup__close:focus-visible,
.gmr-popup__close:active { border: 0; outline: 0; box-shadow: none; }

html.gmr-rp-is-open { overflow: hidden; }

/* PC: 팝업 1개일 때 배너 영역 820 × 492px 고정 */
@media (min-width: 768px) {
  .gmr-popup[data-gmr-popup-count="1"] .gmr-popup__panel { width: 844px; max-width: none; }
  .gmr-popup[data-gmr-popup-count="1"] .gmr-popup__item,
  .gmr-popup[data-gmr-popup-count="1"] .gmr-popup__link,
  .gmr-popup[data-gmr-popup-count="1"] .gmr-popup__image {
    width: 820px;
    height: 492px;
  }
}

@media (min-width: 768px) and (hover: hover) {
  .gmr-popup__close:hover { background-color: #0072bb; }
}

/* 모바일: 팝업 개수와 관계없이 화면 중앙 배치 */
@media (max-width: 767px) {
  .gmr-popup { place-items: center; padding: 20px; }
  .gmr-popup__panel {
    width: min(100%, 360px);
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .gmr-popup__list { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .gmr-popup__controls { padding: 12px 2px 0; }
  .gmr-popup__today { font-size: 14px; }
  .gmr-popup__close { width: 42px; height: 42px; }
}

@media (prefers-reduced-motion: no-preference) {
  .gmr-popup:not([hidden]) .gmr-popup__panel { animation: gmr-popup-in 0.22s ease-out; }
  @keyframes gmr-popup-in {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
  }
}


.chatting { z-index: 1000 !important;}