#wrapper {
  background: #E8E4F4;
  max-width: 768px;
  min-width: 340px;
  margin: 0 auto;
}

header {  
  width: 100%;
  padding: 20px;
  background: #F2F0F9;
  display: flex;
  flex-direction: column; /* 수직 정렬 */
  gap: 16px; /* 요소 간 간격 */
  margin-bottom: 12px;
}

h2 {
  width: 100%;
  color: #25213B;
  font-size: 24px;
  font-style: normal;
  font-weight: 500;
  line-height: 120%;
  letter-spacing: 0.48px;
  text-align: left;
}

.search-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

.search-box select {
  height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #6D5BD0;
  font-size: 16px;
}

#searchBtn {
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: #6D5BD0;
  box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.20);
  display: flex;
  padding: 12px 20px;
  margin: 10px 0px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #FFF;
  font-size: 18px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  cursor: pointer;
}

input {
  height: 22px;
  padding: 8px 0px 8px 16px;
  text-align: left;
  border-radius: 8px;
  border: 1px solid var(--M3-sys-light-outline, #6D5BD0);
  color: var(--M3-sys-light-on-surface, #1D1B20);
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: 0.5px;
}

#bodyWrapper {
  width: 100%;
  min-height: 100vh;
  background: #F2F0F9;
  display: flex;
  padding: 20px;
  flex-direction: column;
  align-items: center;
}

nav {
  width: 100%;
  margin-bottom: 10px;
}

.menuWrapper {
  display: flex;
  border-bottom: 2px solid #C6C2DE;
}

.tab {
  width: 78px;
  color: #6E6893;
  text-align: center;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  padding-bottom: 10px;
  border: 0;
  background-color: #F2F0F9;
  cursor: pointer;
}

.tab.active {
  color: #000;
  border-bottom: 2px solid #000;
}

.content {
  display: none;
  border-radius: 8px;
  background: #FFF;
  box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.20);
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  flex: 1 0 0;
  align-self: stretch;
  position: relative;
}

.content.active {
  display: block;
}

#list .items {
  width: 100%;
}

#list .items .item {
  border-bottom: 1px solid #D9D5EC;
  background: #FFF;
  display: flex;
  align-items: center;
  align-self: stretch;
}

#list .items .itemContent {
  display: flex;
  padding: 20px;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
  flex: 1 0 0;
  align-self: stretch;
  color: #6E6893;
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

#list .items .itemContent .highTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

#list .items .itemContent .marketId {
  display: inline-block;
  background-color: #FFFFFF;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid var(--M3-sys-light-outline, #79747E);
  color: var(--M3-sys-light-primary, #6750A4);
  text-align: center;
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  line-height: 16px; 
  letter-spacing: 0.5px;
}

#list .items .itemContent .top {
  width: 100%;
}

#list .items .itemContent .gachaResultDetail {
  display: inline-block;
  color: #25213B;
  font-size: 24px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
}

#list .items .itemContent .middle {
  font-size: 24px;
  line-height: 120%;
}

#list .items .eventContent {
  display: flex;
  width: 100px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  align-self: stretch;
}

#list .items .eventContent .deleteBtn {
  background-color: transparent;
  border: 1px solid #6D5BD0;
  color: #6D5BD0;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#list .items .eventContent .deleteBtn:hover {
  background-color: #6D5BD0;
  color: #FFF;
}


#stamp .items {
  width: 100%;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 16px;
}

#stamp .items .stampCard {
  background: #FFF;
  border: 1px solid #E2E0F0;
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  box-shadow: 0 0 5px rgba(0,0,0,.08);
}

#stamp .items .stampBadge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F4F2FF;
  overflow: hidden;
}

#stamp .items .stampBadge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#stamp .items .stampName {
  color: #25213B;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  margin-top: 4px;
  word-break: keep-all;
}

#stamp .items .stampLevel {
  color: #6E6893;
  font-size: 12px;
  margin-top: 4px;
}

/* 숫자 카운트 뱃지 */
.stampCount {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #6D5BD0;
  color: #fff;
  border-radius: 12px;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

/* 기본 이미지 컨테이너 */
.stampBadge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F4F2FF;
  overflow: hidden;
  position: relative;
}

/* 잠긴(안 찍힌) 상태 스타일 */
.stampBadge.locked {
  filter: grayscale(1) brightness(0.9);
  position: relative;
}

/* 반투명한 오버레이 + 자물쇠 아이콘 */
.lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 20px;
  font-weight: bold;
}

/* level 중앙 배치 */
.level-badge {
  display: inline-block;
  margin-top: 6px;
  margin-bottom: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}

.level-badge.special {
  background: #E74C3C;
}

.level-badge.collection {
  background: #6D5BD0;
}

.level-badge.normal {
  background: #6E6E6E;
}
