/* ===========================
   SUBSELECT AI 스타일 선택
   =========================== */

.subselect-screen {
  background: #ffffff;
}

/* 헤더 */
.subselect-header {
  padding: 5.15cqw 5.15cqw 0;
}
.subselect-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 15.45cqw;
  height: 8.58cqw;
  background: #222222;
  border-radius: 21.46cqw;
  border: none;
  cursor: pointer;
}
.subselect-back-btn:active {
  transform: scale(0.95);
}
.subselect-back-icon {
  width: 5.15cqw;
  height: 5.15cqw;
}
.subselect-title {
  font-weight: 700;
  font-size: 5.15cqw;
  line-height: 6.87cqw;
  color: #222222;
  margin: 0;
}

/* 카테고리 탭 */
.subselect-tabs-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  flex-shrink: 0;
  white-space: nowrap;
  padding: 5.15cqw 5.15cqw;
  cursor: grab;
}
.subselect-tabs-wrap:active {
  cursor: grabbing;
}
.subselect-tab {
  display: inline-block;
  padding: 2.58cqw 6.87cqw;
  margin-right: 2.58cqw;
  border-radius: 21.46cqw;
  border: none;
  cursor: pointer;
  font-family: "Pretendard", sans-serif;
  font-size: 3.43cqw;
  line-height: 4.08cqw;
  text-align: center;
  color: #ffffff;
  background: #666666;
  font-weight: 500;
  white-space: nowrap;
}
.subselect-tab:last-child {
  margin-right: 0;
}
.subselect-tab--active {
  background: #222222;
  font-weight: 700;
}

/* 스타일 그리드 */
.subselect-grid-wrap {
  padding: 0 5.15cqw 5.15cqw;
  -webkit-overflow-scrolling: touch;
  will-change: transform;
  contain: layout style;
}
.subselect-grid {
  gap: 5.15cqw;
  contain: layout style;
}

/* 스타일 카드 */
.style-card-frame {
  width: 100%;
  aspect-ratio: 197 / 240;
  background: #222222;
  border-radius: 4.29cqw;
  padding: 1.72cqw;
  border: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: transform 0.15s ease-out;
  will-change: transform;
  contain: layout style paint;
}
.style-card-frame:active {
  transform: scale(0.97);
}
.style-card-inner {
  width: 100%;
  height: 100%;
  background: #ffffff;
  border-radius: 2.58cqw;
  overflow: hidden;
  position: relative;
}
.style-card-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(51, 51, 51, 0.6);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  z-index: 1;
}
.style-card-frame:hover .style-card-inner::after,
.style-card-frame:active .style-card-inner::after {
  opacity: 1;
}
.style-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  overflow-clip-margin: unset;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}
.style-card-label {
  z-index: 2;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: #222222;
  border-radius: 2.15cqw 2.15cqw 0 0;
  padding: 1.72cqw 11.16cqw;
  font-weight: 700;
  font-size: 4.29cqw;
  line-height: 5.15cqw;
  color: #ffffff;
  white-space: nowrap;
  text-align: center;
}

/* 모드 선택 */
.subselect-mode-wrap {
  padding: 5.15cqw;
  gap: 5.15cqw;
}

/* 선택된 스타일 이미지 카드 */
.mode-style-card {
  position: relative;
  width: 100%;
  aspect-ratio: 418 / 452;
  background: #222222;
  border-radius: 4.29cqw;
  overflow: hidden;
  flex-shrink: 0;
}
.mode-style-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mode-style-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 36.73%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    #000000 88.65%
  );
  pointer-events: none;
}
.mode-style-info {
  position: absolute;
  bottom: 3.43cqw;
  left: 3.43cqw;
  right: 3.43cqw;
  display: flex;
  flex-direction: column;
  gap: 1.72cqw;
}
.mode-style-name-row {
  display: flex;
  align-items: center;
  gap: 1.5cqw;
}
.mode-style-name {
  font-weight: 700;
  font-size: 5.15cqw;
  color: #ffffff;
}
.mode-style-sep {
  width: 0.21cqw;
  height: 2.58cqw;
  background: #ffffff;
  flex-shrink: 0;
}
.mode-style-type {
  font-weight: 500;
  font-size: 3.43cqw;
  color: #ffffff;
}
.mode-change-btn {
  width: 100%;
  padding: 3.43cqw 6.87cqw;
  background: #ffffff;
  border-radius: 21.46cqw;
  border: none;
  cursor: pointer;
  font-family: "Pretendard", sans-serif;
  font-weight: 600;
  font-size: 4.29cqw;
  color: #333333;
  text-align: center;
  transition: transform 0.2s;
}
.mode-change-btn:active {
  transform: scale(0.97);
}

/* 모드 옵션 카드 */
.mode-options {
  display: flex;
  gap: 5.15cqw;
}
.mode-option-frame {
  flex: 1;
  aspect-ratio: 197 / 240;
  background: #222222;
  border-radius: 4.29cqw;
  padding: 1.72cqw;
  border: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: transform 0.2s;
}
.mode-option-frame:active {
  transform: scale(0.95);
}
.mode-option-inner {
  width: 100%;
  height: 100%;
  background: #ffffff;
  border-radius: 2.58cqw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3.43cqw;
}
.mode-option-frame:hover .mode-option-inner,
.mode-option-frame:active .mode-option-inner {
  background:
    linear-gradient(0deg, rgba(102, 102, 102, 0.2), rgba(102, 102, 102, 0.2)),
    #ffffff;
}

.mode-option-icon {
  width: 17.17cqw;
  height: 17.17cqw;
  object-fit: contain;
}
.mode-option-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.72cqw;
}
.mode-option-title {
  font-weight: 700;
  font-size: 5.15cqw;
  color: #222222;
  text-align: center;
}
.mode-option-desc {
  font-weight: 500;
  font-size: 3cqw;
  line-height: 3.65cqw;
  color: #222222;
  text-align: center;
  white-space: pre-line;
}
