[hidden] {
  display: none !important;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.58);
  isolation: isolate;
}

.modal-panel {
  width: min(100%, 460px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.modal-panel--large {
  width: min(100%, 640px);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #111827;
}

.modal-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  font-size: 24px;
  cursor: pointer;
}

.modal-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.modal-body {
  padding: 22px;
}

.modal-message {
  margin: 0;
  color: #475569;
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-line;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px 22px;
}

.modal-button {
  min-width: 88px;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.modal-button--secondary {
  background: #e2e8f0;
  color: #334155;
}

.modal-button--primary {
  background: #2563eb;
  color: #ffffff;
}

.modal-button--danger {
  background: #dc2626;
  color: #ffffff;
}

.modal-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* v2.2.4: 공통 모달의 상세/입력 콘텐츠 지원 */
.modal-backdrop--wide .modal-card,
.modal-backdrop--wide .modal-panel {
  width: min(100%, 760px);
}
[data-modal-message] > :first-child { margin-top: 0; }
[data-modal-message] > :last-child { margin-bottom: 0; }
