/* Site popup layer — loaded as real stylesheet (innerHTML <style> can fail to register) */
.kscg-popup-shell,
.openPopupLayer.kscg-popup-shell {
  box-sizing: border-box !important;
  position: fixed !important;
  display: flex !important;
  flex-direction: column !important;
  /* 하단 radius에서 흰 배경이 비치지 않도록 셸 베이스를 푸터색으로 */
  background: #0f172a !important;
  background-color: #0f172a !important;
  color: #0f172a !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.28) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  isolation: isolate;
  opacity: 1 !important;
  visibility: visible !important;
  font-family: var(--kscg-font-sans, "Pretendard", "Noto Sans KR", system-ui, sans-serif) !important;
  font-size: 14px;
  line-height: 1.5;
}
.kscg-popup-head {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 10px 14px !important;
  margin: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
  background: #eef2f6 !important;
  background-color: #eef2f6 !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  min-height: 44px !important;
  height: auto !important;
  cursor: move;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.kscg-popup-head__title {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  color: #334155 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  pointer-events: none;
  background: transparent !important;
}
.kscg-popup-head__x {
  appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  margin: 0 0 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  color: #64748b !important;
  font-size: 18px !important;
  line-height: 1 !important;
  touch-action: manipulation !important;
  pointer-events: auto !important;
  position: relative !important;
  z-index: 2 !important;
}
.kscg-popup-body {
  display: block !important;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  background: #fff !important;
  background-color: #fff !important;
  color: #0f172a !important;
  padding: 18px 20px !important;
  margin: 0 !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  /* 기본만 지정 — 에디터 인라인 font-size/color 가 우선 */
  font-size: 14px;
  line-height: 1.55;
}
.kscg-popup-body::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
.kscg-popup-body p,
.kscg-popup-body div,
.kscg-popup-body span,
.kscg-popup-body li,
.kscg-popup-body a,
.kscg-popup-body h1,
.kscg-popup-body h2,
.kscg-popup-body h3 {
  max-width: 100%;
}
.kscg-popup-body img {
  max-width: 100% !important;
  height: auto !important;
}
.kscg-popup-bar {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 6px 12px !important;
  margin: 0 !important;
  min-height: 36px !important;
  height: 36px !important;
  max-height: 36px !important;
  width: 100% !important;
  flex: 0 0 auto !important;
  box-sizing: border-box !important;
  background: #0f172a !important;
  background-color: #0f172a !important;
  color: #ffffff !important;
  border: 0 !important;
  border-top: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  /* 하단 라운드와 동일 — 흰 라인 제거 */
  border-radius: 0 0 8px 8px !important;
  position: relative !important;
  z-index: 2 !important;
  line-height: 1.2 !important;
}
.kscg-popup-bar:focus,
.kscg-popup-bar:focus-visible,
.kscg-popup-bar:focus-within {
  outline: none !important;
  box-shadow: none !important;
}
.kscg-popup-bar__btn {
  appearance: none !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  cursor: pointer !important;
  font: inherit !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  color: inherit !important;
  touch-action: manipulation !important;
  pointer-events: auto !important;
  position: relative !important;
  z-index: 2 !important;
  -webkit-tap-highlight-color: transparent;
}
.kscg-popup-bar__btn:hover,
.kscg-popup-bar__btn:focus,
.kscg-popup-bar__btn:focus-visible,
.kscg-popup-bar__btn:active {
  outline: none !important;
  border: 0 !important;
  box-shadow: none !important;
}
.kscg-popup-bar__btn--close {
  margin-left: auto !important;
}
.kscg-popup-dim {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(15, 23, 42, 0.45) !important;
  z-index: 2147483500 !important;
  opacity: 1 !important;
}
.openPopupLayer.kscg-popup-shell {
  left: 50% !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  width: min(520px, calc(100vw - 24px)) !important;
  height: min(70vh, 640px, calc(100vh - 24px)) !important;
  min-height: 0 !important;
  max-width: calc(100vw - 24px) !important;
  max-height: calc(100vh - 24px) !important;
  z-index: 2147483600 !important;
}
.openPopupLayer.kscg-popup-shell.is-moved {
  transform: none !important;
}
.kscg-popup-shell.is-dragging {
  transition: none !important;
  animation: none !important;
}
@media (max-width: 720px) {
  .openPopupLayer.kscg-popup-shell {
    width: calc(100vw - 24px) !important;
    height: min(78vh, 640px, calc(100vh - 24px)) !important;
    min-height: 0 !important;
  }
  .kscg-popup-body {
    padding: 14px !important;
  }
}
