:root {
  --border-color: linear-gradient(
    90deg,
    rgba(247, 212, 255, 1) 20.328125854333244%,
    rgba(247, 212, 254, 1) 20.328125854333244%,
    rgba(255, 230, 244, 1) 80.32812823851904%
  );
  --text-color: #b86385;
}

.type-chara {
  position: relative;
}

@media screen and (max-width: 1150px) {
  .type-chara {
    padding: 0;
  }
}

.role {
  width: 100%;
  height: 100lvh;
  display: flex;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  gap: 20px;
  opacity: 1;
  background-image: var(--border-color);
  background-size: cover;
  /* 重點：寬度最少100%，等比填滿整個容器 */
  background-position: center center;
  /* 圖片置中 */
  background-repeat: no-repeat;
}

@media screen and (max-width: 768px) {
  .role {
    padding: 20px 0;
  }
}

.role-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 150px;
}

@media screen and (max-width: 1600px) {
  .role-content {
    padding: 20px 100px;
  }
}
@media screen and (max-width: 1300px) {
  .role-content {
    padding: 20px 50px;
  }
}
@media screen and (max-width: 1000px) {
  .role-content {
    padding: 20px;
  }
}

@media screen and (max-width: 768px) {
  .role-content {
    width: 100%;
  }
}

/* 按鈕 */
.role-content-button {
  display: flex;
  gap: 10px;
  z-index: 5;
}

@media screen and (max-width: 768px) {
  .role-content-button {
    justify-content: center;
  }
}

@media screen and (max-width: 440px) {
  .role-content-button {
    gap: 0;
  }
}

.role-content-button button {
  width: 120px;
  background-color: transparent;
  border: none;
  cursor: pointer;
}

@media screen and (max-width: 768px) {
  .role-content-button button {
    width: 100%;
    max-width: 100px;
  }
}

.role-content-button button img {
  width: 100%;
}

/* 介紹 */
.role-content-introduce {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media screen and (max-width: 768px) {
  .role-content-introduce {
    align-items: center;
  }
}

@media screen and (max-width: 550px) {
  .role-content-introduce {
    gap: 0;
  }
}

/* 名字 */
.role-content-introduce-name {
  display: none;
  align-items: center;
}

@media screen and (max-width: 768px) {
  .role-content-introduce-name {
    width: 100%;
    display: flex;
    justify-content: center;
  }
}

.role-content-introduce-name img {
  width: auto;
  max-width: 80%;
  height: 100px;
  object-fit: contain;
}

@media screen and (max-width: 550px) {
  .role-content-introduce-name img {
    height: 50px;
  }
}

.role-content-introduce-name p {
  font-size: 32px !important;
  font-weight: 900;
  z-index: 3;
}

@media screen and (max-width: 550px) {
  .role-content-introduce-name p {
    font-size: 28px !important;
  }
}

/* 內容 */
.role-content-introduce-text {
  width: 550px;
  height: 250px;
  padding: 50px;
  background-image: url(../img/role/box.webp);
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  gap: 10px;
  z-index: 3;
}

@media screen and (max-width: 768px) {
  .role-content-introduce-text {
    width: calc(100% - 20px);
    max-width: 500px;
    height: 250px;
    padding: 50px 20px;
    z-index: 5;
  }
}

@media screen and (max-width: 550px) {
  .role-content-introduce-text {
    width: calc(100% - 20px);
    padding: 20px;
    height: 180px;
  }
}

/* 文字 */
.role-content-introduce-text p {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-color);
}

@media screen and (max-width: 1000px) {
  .role-content-introduce-text p {
    width: 100%;
    font-size: 24px;
  }
}

@media screen and (max-width: 768px) {
  .role-content-introduce-text p {
    width: 100%;
    font-size: 24px;
    text-align: center;
  }
}

@media screen and (max-width: 550px) {
  .role-content-introduce-text p {
    font-size: 16px;
    font-weight: 700;
  }
}

.role-content-introduce-text-arrow {
  position: absolute;
  bottom: 10%;
  right: 10%;
}

/* 圖片 */
.role-img {
  position: relative;
}
.role-img .background {
  height: 100%;
  width: auto;
  position: relative;
  z-index: 2;
}
@media screen and (max-width: 1000px) {
  .role-img {
    right: 15%;
  }
}
@media screen and (max-width: 768px) {
  .role-img .background {
    display: none;
  }
}

/* 人物 */
.role-img-figure {
  width: 100%;
  position: absolute;
  top: 0;
  left: -30%;
  z-index: 3;
}
.role-img-figure img {
  width: 100%;
}

@media screen and (max-width: 768px) {
  .role-img {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    right: 0;
  }

  .role-img img {
    position: absolute;
    right: 50%;
    transform: translateX(50%) !important;
  }

  .role-img-figure {
    position: relative;
    left: auto;
    top: 50px;
  }
}

.triangle {
  width: 30%;
  position: absolute;
}

@media screen and (max-width: 768px) {
  .triangle {
    width: 120%;
  }
}

@media screen and (max-width: 768px) {
  .role-background {
    width: 100%;
  }
}

.role-background1 {
  bottom: 0;
  left: 0;
}

.role-background2 {
  right: 0;
  bottom: 0;
}

/* 姓名 */
.role-content-name {
  height: 20%;
  max-width: 800px;
  z-index: 5;
}
.role-content-name img {
  height: 100%;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}

@media screen and (max-width: 768px) {
  .role-content-name {
    display: none;
  }
}
