/* ===== メンバー紹介ページ ===== */
.fixed-top-menu {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.member-page {
  width: 100%;
  padding: 32px 0 64px;
  background-color: #f5f6f7;
}

.member-menu-note {
  margin-bottom: 28px;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.member-title-area {
  margin-bottom: 8px;
}

.member-title-en {
  margin-bottom: 8px;
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.member-title-logo {
  width: min(74%, 520px);
  margin: 0 auto;
}

.member-main-photo-wrap {
  position: relative;
  width: min(88%, 620px);
  margin: -4px auto 18px;
}

.member-main-photo {
  width: 100%;
  height: auto;
}

.fade-in-main-photo {
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  animation: mainPhotoFadeIn 1s ease forwards;
  animation-delay: 0.25s;
}

@keyframes mainPhotoFadeIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.member-message-area {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: min(100%, 680px);
  margin: 0 auto 22px;
}

.member-side-person {
  flex: 0 0 auto;
  width: 140px;
  max-width: none;
  transform: rotate(-7deg);
  transform-origin: center bottom;
  animation: onoFloat 2.6s ease-in-out infinite;
  z-index: 1;
}

@keyframes onoFloat {
  0%, 100% {
    transform: translateY(0) rotate(-7deg);
  }
  50% {
    transform: translateY(-10px) rotate(-7deg);
  }
}

.member-intro-text {
  flex: 0 1 430px;
  z-index: 2;
  font-size: clamp(1.4rem, 2vw, 1.2rem);
  font-weight: 900;
  line-height: 1.45;
  text-align: center;
}

.member-round-icon {
  flex: 0 0 auto;
  width: 100px;
  max-width: none;
  transform: translateY(-14px) rotate(8deg);
  transform-origin: center bottom;
  animation: iconFloat 2.6s ease-in-out infinite;
  z-index: 1;
}

@keyframes iconFloat {
  0%, 100% {
    transform: translateY(-14px) rotate(8deg);
  }

  50% {
    transform: translateY(-24px) rotate(8deg);
  }
}

.member-card-area {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px 34px;
  width: min(100%, 640px);
  margin: 0 auto;
}

.member-photo-button {
  display: block;
  aspect-ratio: 1 / 1;
  border: 3px solid #222222;
  background-color: #ffffff;
  box-shadow: 3px 3px 0 #d5d000;
  line-height: 0;
  transition: 0.2s ease;
}

.member-photo-button:hover {
  transform: translateY(-3px);
  filter: brightness(1.03);
}

.member-photo-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-group-area {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 36px;
  width: min(100%, 720px);
  margin: 42px auto 0;
  align-items: start;
}

.member-group-card {
  margin: 0;
  text-align: center;
}

.member-group-img {
  display: block;
  width: 342px;
  max-height: 280px;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

.member-group-caption {
  margin-top: 10px;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.04em;
  text-shadow: 3px 4px 0 rgba(0, 0, 0, 0.18);
}

@media (max-width: 640px) {
  .member-page {
    padding: 20px 0 40px;
  }

  .member-frame {
    width: min(100% - 28px, 520px);
    padding: 18px 12px 36px;
    border-width: 4px;
    overflow: hidden;
  }

  .member-menu-note {
    margin-bottom: 22px;
    font-size: 0.9rem;
  }

  .member-title-logo {
    width: min(86%, 420px);
  }

  .member-main-photo-wrap {
    --main-photo-width: 100%;
    --main-photo-x: 12px;
    width: var(--main-photo-width);
    max-width: 480px;
    margin: 0 auto 16px;
    overflow: visible;
    transform: translateX(var(--main-photo-x));
  }

  .member-main-photo {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
  }

  .member-message-area {
    grid-template-columns: 96px 1fr 58px;
    gap: 8px;
    margin-bottom: 20px;
  }

  .member-side-person {
    width: 110px;
    max-width: none;
  }

  .member-round-icon {
    width: 52px;
    transform: translateY(-8px) rotate(8deg);
  }

.member-intro-text {
  grid-column: 1 / -1;
  grid-row: 1;
  justify-self: center;
  align-self: center;
  z-index: 2;
  width: min(100%, 320px);
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.45;
  text-align: center;
}

  .member-card-area {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 22px;
    width: 92%;
  }

  .member-group-area {
    grid-template-columns: 1fr;
    gap: 28px;
    width: 92%;
    margin-top: 34px;
  }

  .member-group-img {
    max-height: 260px;
  }

  .member-group-caption {
    margin-top: 8px;
    font-size: 1.55rem;
  }

  .profile-modal-close::before {
    font-size: 1.7rem;
    line-height: 0.86;
    transform: translateY(-1px);
  }
}

/* ===== プロフィールポップアップ ===== */
.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  place-items: center;
  padding: 24px;
  background-color: rgba(0, 0, 0, 0.55);
}

.profile-modal.is-open {
  display: grid;
}

.profile-modal-content {
  position: relative;
  width: min(92vw, 760px);
  max-height: 90vh;
  animation: profileModalFadeIn 0.35s ease forwards;
}

.profile-modal-img {
  display: block;
  width: 100%;
  max-height: 90vh;
  object-fit: contain;
  background-color: #ffffff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}

.profile-modal-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: none;
  border-radius: 50%;
  background-color: #ffe600;
  color: #111111;
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 5px 6px 0 rgba(0, 0, 0, 0.32);
  cursor: pointer;
  transform: translateY(-50%);
  transition: 0.2s ease;
}

.profile-modal-prev {
  left: -74px;
}

.profile-modal-next {
  right: -74px;
}

.profile-modal-nav:hover {
  filter: brightness(1.05);
}

.profile-modal-close {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background-color: #ffe600;
  color: #111111;
  font-size: 0;
  font-weight: 900;
  line-height: 1;
  padding: 0;
  text-align: center;
  box-shadow: 5px 6px 0 rgba(0, 0, 0, 0.32);
  cursor: pointer;
  transition: 0.2s ease;
  align-items: center;
  justify-items: center;
  overflow: visible;
}

.profile-modal-close::before {
  content: "×";
  display: block;
  width: 1em;
  height: 1em;
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 0.86;
  text-align: center;
  transform: translateY(6px);
}

.profile-modal-close:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

@keyframes profileModalFadeIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 640px) {
  .profile-modal {
    padding: 16px;
  }

  .profile-modal-content {
    width: min(96vw, 520px);
  }

  .profile-modal-nav {
    width: 34px;
    height: 34px;
    font-size: 1.55rem;
    box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.28);
  }

  .profile-modal-prev {
    left: 6px;
  }

  .profile-modal-next {
    right: 6px;
  }

  .profile-modal-close {
    right: 10px;
    bottom: 10px;
    width: 36px;
    height: 36px;
    box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.28);
  }
  .profile-modal-close::before {
    font-size: 1.45rem;
    line-height: 0.86;
    transform: translateY(4px);
  }
}