.custom-player {
  display: flex;
  align-items: flex-end;
  position: relative;
  /* 色 */
  background: linear-gradient(
    to top,
    #D9D9D9 45%,
    #FFFFFF 45%
  );
  padding: 16px 16px 10px 16px;
  width: clamp(320px, 92vw, var(--player-max, 800px));
  margin: 40px auto;
}
/* シークバー */
.custom-player::before {
  content: "";
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  height: 48px;
  background: #D9D9D9;
  z-index: 0;
}

/* アートワーク */
.custom-player .artwork {
  position: relative;
  z-index: 1;
  width: 140px;
  height: 140px;
  box-sizing: border-box;
  border: 6px solid #D9D9D9;
  object-fit: cover;
  border-radius: 0;
  flex-shrink: 0;
}

/* コントロール全体 */
.custom-player .controls {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  flex: 1;
  padding-left: 16px;
}

/* Plyr 本体設定 */
.custom-player .controls .plyr {
  width: 100%;
  box-shadow: none !important;
  border-radius: 0 !important;

  /* テーマ色 */
  --plyr-color-main: #7b7b7b;
  --plyr-range-fill-background: #7b7b7b;          /* 再生済みシーク */
  --plyr-video-range-track-background: #D9D9D9;   /* 未再生シーク */
}

/* ボタン配置 */
.custom-player .plyr__controls {
  justify-content: flex-end;
}

/* 大きな再生ボタン */
.custom-player .plyr__play-large {
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* 各コントロールボタン */
.custom-player .plyr__control {
  border-radius: 0 !important;
}

/* ホバー時色 */
.custom-player .plyr__control:hover,
.custom-player .plyr__play-large:hover {
  color: #323232 !important;
  background-color: transparent !important;
}


.custom-player .title {
  position: absolute;
  top: calc(16px + 60px + 12px);
  transform: translateY(-50%);
  left: 172px;
  z-index: 1;

  display: inline-block;
  padding: 4px 32px 0px 16px;
  background-color: #FFFFFF;
  box-shadow: none;

  font-size: 1.8rem;
  font-weight: bold;
  color: #323232;
  pointer-events: none;
  z-index: 2;
}

@media screen and (max-width: 500px) {
  .custom-player {
    flex-direction: column;
    align-items: center;
    padding: 16px 8px 10px 8px;
  }
  .custom-player .artwork {
    margin-bottom: 16px;
    width: 100%;
    max-width: 300px;  /* 必要に応じて調整 */
    height: auto;
  }
  .custom-player .controls {
    width: 100%;
    padding-left: 0;
  }
  /* タイトルの再配置 */
  .custom-player .title {
    position: static;
    transform: none;
    margin-bottom: 8px;
    padding: 4px 16px;
    text-align: center;
  }
}

