.commission-wrapper {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 24px;
}

.page-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

#addImageBtn {
  border: 1px solid #005BFF;
  background: #005BFF;
  color: #fff;
  font-size: 12px;
  padding: 6px 12px;
  cursor: pointer;
}

.commission-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.commission-card {
  aspect-ratio: 3 / 4;
  background: #eee;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.commission-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.commission-card:hover img {
  transform: scale(1.05);
}


#deleteImage {
  margin-top: 8px;
  font-size: 12px;
  border: 1px solid #d00;
  background: #fff;
  color: #d00;
}

/* =====================
   Overlay Delete Button
===================== */
.overlay-delete {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #005BFF;
  background: #005BFF;
  color: #fff;
  cursor: pointer;
}

.overlay-delete:hover {
  background: #0046cc;
}

/* =====================
   Overlay Background
===================== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  z-index: 999;
}

.overlay.hidden {
  display: none;
}

/* =====================
   Overlay Card (종이 느낌)
===================== */
.overlay-card {
  width: 420px;
  max-width: 90vw;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 14px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  animation: overlayUp 0.25s ease;
}

@keyframes overlayUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 닫기 버튼 */
.overlay-close {
  font-size: 12px;
  padding: 4px 8px;
  border: none;
  border-radius: 6px;
  background: #f2f2f2;
  cursor: pointer;
}

.overlay-close:hover {
  background: #e6e6e6;
}

/* 이미지 */
.overlay-image img {
  width: 100%;
  border-radius: 10px;
  margin-top: 8px;
  display: block;
}

/* 하단 */
.overlay-footer {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.overlay-source {
  font-size: 12px;
  color: #666;
}

.sort-controls {
  display: flex;
  gap: 6px;
}

.sort-btn {
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  border-radius: 6px;
}

.sort-btn.active {
  border-color: #005BFF;
  color: #005BFF;
  font-weight: 500;
}
