/* 네임스페이스로 기존 .modal 과 충돌 차단 */
.pai-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(1px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.pai-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.pai-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  max-width: 720px;
  width: min(92vw, 720px);
  max-height: 80vh;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  display: flex;
  flex-direction: column;
}

.pai-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.pai-modal__header {
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  gap: 8px; 
  padding: 20px 24px 16px 24px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.pai-modal__title { 
  font-size: 18px; 
  font-weight: 700; 
  color: #1f2937;
}

.pai-modal__close {
  border: 0; 
  background: transparent; 
  font-size: 20px; 
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.pai-modal__close:hover {
  background-color: #f3f4f6;
}

.pai-modal__body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  line-height: 1.6;
  color: #374151;
}

.pai-modal__footer {
  padding: 16px 24px 20px 24px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}

.pai-modal__ok-btn {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.pai-modal__ok-btn:hover {
  background: #2563eb;
}

.pai-no-scroll { overflow: hidden; }

/* 혹시 기존 전역 .modal 규칙이 있다면 무력화 */
.modal, .modal.visible { all: unset; }
