div.contents {
  padding: 0;
}

.chart div.wrap {
  padding: 0;
}

#chart .diagram {
  position: relative;
  margin: 0 auto;
  background-size: 100%;
}

#chart .diagram ul, #chart .diagram ul li {
  position: absolute;
  width: max-content;
  height: max-content;
}

#chart .diagram ul li a {
  display: block;
  text-decoration: none;
  overflow: hidden;
  text-indent: 100%;
  white-space: nowrap;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 100%);
}

#chart .diagram ul li a img {
  display: block;
}

/*	main size */
#chart .diagram ul li.sz-ll a img {
  width: 251px;
  height: 319px;
}

#chart .diagram ul li.sz-l a img {
  width: 220px;
  height: 280px;
}

#chart .diagram ul li.sz-m a img {
  width: 167px;
  height: 210px;
}

#chart .diagram ul li.sz-s a img {
  width: 139px;
  height: 175px;
}

/*	position */
#chart ul li.katsuragihayame {
  left: 150px;
  top: 313px;
}

#chart ul li.kataokaissei {
  left: 496px;
  top: 352px;
}

#chart ul li.kataokaseigo {
  left: 411px;
  top: 713px;
}

#chart ul li.kataokaetsuko {
  left: 790px;
  top: 713px;
}

#chart ul li.yoshitoraeiji {
  left: 790px;
  top: 382px;
}

#chart ul li.kikuno {
  left: 22px;
  top: 713px;
}

#chart ul li.kurosekoya {
  left: 67px;
  top: 1057px;
}

#chart ul li.fujitatomomi {
  left: 257px;
  top: 1057px;
}

#chart ul li.sakamuramahiro {
  left: 448px;
  top: 1091px;
}

#chart ul li.chibanozomi {
  left: 608px;
  top: 1091px;
}

#chart ul li.matsunoakane {
  left: 769px;
  top: 1091px;
}

#chart ul li.imaimasahiro {
  left: 22px;
  top: 28px;
}

#chart ul li.nodakensuke {
  left: 326px;
  top: 92px;
}

#chart ul li.adachimomoka {
  left: 481px;
  top: 92px;
}

#chart ul li.shinozakichisato {
  left: 636px;
  top: 92px;
}

#chart ul li.shimoyamakazuki {
  left: 791px;
  top: 92px;
}

@media all and (min-width: 768px) {
  #chart .diagram {
    background-repeat: no-repeat;
    height: 1321px;
    /* margin: 20px 140px; */
  }

  div.contents {
    width: 980px;
  }
}

@media all and (max-width: 767px) {

  /*chart*/
  #chart .diagram {
    margin: 0px auto;
    overflow: hidden;
    width: 100%;
    height: 0;
    background-size: cover;
  }

  #chart .diagram {
    padding-top: calc((1321 / 980)*100%);
    background-size: 100%;
    background-repeat: no-repeat;
  }

  #chart .diagram ul {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
  }
}

/*popup*/
#cast_dt {
  text-align: left;
  /*border:4px solid #fff;*/
  /* background-color: #fff; */
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, 0 center;
  background-size: auto, cover;
  margin: 1em;
}

#cast_dt #mainbox {
  width: 100%;
  height: auto;
  margin: 0 auto;
  padding: 0;
}

#cast_dt h1 {
  width: 100%;
  margin: .2em auto .5em;
  padding: .6em 0 0;
  background: none;
}

#cast_dt h1 {
  position: relative;
  z-index: 2;
}

#cast_dt h1:before {
  background-color: rgba(255, 255, 255, 0.5);
  content: '';
  position: absolute;
  top: 12%;
  left: 12%;
  width: 88%;
  height: 76%;
  z-index: -1;
}

#cast_dt h1 span.castname {
  width: 90%;
  height: 78px;
  margin: 0 auto;
  display: block;
  text-indent: 100%;
  white-space: nowrap;
  overflow: hidden;
  background-repeat: no-repeat;
  background-position: 0 0;
}

#cast_dt .photo {
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 2px 15px 28px rgba(3, 47, 63, 0.1);
  background-color: rgba(255, 255, 255, 0.25);
}

#cast_dt {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 5800 !important;
  bottom: 0;
  right: 0;
  margin: auto;
}

@media all and (max-width: 767px) {
  #cast_dt {
    /* top: 3%; */
  }
}

.btn-w-close a {
  display: block;
  width: 81px;
  height: 34px;
  background: url(../img/chart/close.png) no-repeat;
  margin: 0 0 0 auto;
  background-size: contain;
}

.btn-w-close a {
  cursor: pointer;
}

@media all and (min-width: 768px) {
  .chart div.sns-share {
    padding: 60px;
  }

  #cast_dt {
    width: 700px;
    height: 417px;
    margin-left: -342px;
    box-sizing: border-box;
    background-size: cover;
  }

  .katsuragihayame {
    background-image: url(../img/character/katsuragihayame.png?210726);
  }

  .kataokaissei {
    background-image: url(../img/character/kataokaissei.png?210726);
  }

  .kataokaseigo {
    background-image: url(../img/character/kataokaseigo.png?210726);
  }

  .kataokaetsuko {
    background-image: url(../img/character/kataokaetsuko.png?210726);
  }

  .yoshitoraeiji {
    background-image: url(../img/character/yoshitoraeiji.png?210726);
  }

  .kikuno {
    background-image: url(../img/character/kikuno.png?210726);
  }

  .kurosekoya {
    background-image: url(../img/character/kurosekoya.png?210726);
  }

  .fujitatomomi {
    background-image: url(../img/character/fujitatomomi.png?210726);
  }

  .chibanozomi {
    background-image: url(../img/character/chibanozomi.png?210726);
  }

  .matsunoakane {
    background-image: url(../img/character/matsunoakane.png?210726);
  }

  .sakamuramahiro {
    background-image: url(../img/character/sakamuramahiro.png?210726);
  }

  .imaimasahiro {
    background-image: url(../img/character/imaimasahiro.png?210726);
  }

  .nodakensuke {
    background-image: url(../img/character/nodakensuke.png?210726);
  }

  .adachimomoka {
    background-image: url(../img/character/adachimomoka.png?210726);
  }

  .shinozakichisato {
    background-image: url(../img/character/shinozakichisato.png?210726);
  }

  .shimoyamakazuki {
    background-image: url(../img/character/shimoyamakazuki.png?210726);
  }

  #cast_dt #mainbox {
    margin: 0 auto;
  }

  #cast_dt .photo {
    width: 280px;
    height: 360px;
    padding: 0;
    margin: 0 20px 0 35px;
  }

  .btn-w-close {
    position: absolute;
    right: 5px;
    bottom: -50px;
  }

  #cast_dt span.ovtxt {
    display: inline-block;
    height: 230px;
    overflow-x: hidden;
    overflow-y: scroll;
  }

  .ovtxt::-webkit-scrollbar {
    width: 4px;
    background: none;
  }

  .ovtxt::-webkit-scrollbar-thumb {
    background: #111;
  }
}

@media all and (max-width: 767px) {
  .chart div.sns-share {
    padding: 1em;
  }

  .picture {
    position: relative;
    height: 0;
    padding-top: 158.217877%;
  }

  .picture span {
    position: absolute;
    height: 100%;
    left: 0;
    top: 0;
    width: 100%;
  }

  .katsuragihayame .picture {
    background-image: url(../img/character/katsuragihayame_s.png?210726);
  }

  .kataokaissei .picture {
    background-image: url(../img/character/kataokaissei_s.png?210726);
  }

  .kataokaseigo .picture {
    background-image: url(../img/character/kataokaseigo_s.png?210726);
  }

  .kataokaetsuko .picture {
    background-image: url(../img/character/kataokaetsuko_s.png?210726);
  }

  .yoshitoraeiji .picture {
    background-image: url(../img/character/yoshitoraeiji_s.png?210726);
  }

  .kikuno .picture {
    background-image: url(../img/character/kikuno_s.png?210726);
  }

  .kurosekoya .picture {
    background-image: url(../img/character/kurosekoya_s.png?210726);
  }

  .fujitatomomi .picture {
    background-image: url(../img/character/fujitatomomi_s.png?210726);
  }

  .chibanozomi .picture {
    background-image: url(../img/character/chibanozomi_s.png?210726);
    padding-top: 135.217877%;
    background-position: bottom;
  }

  .matsunoakane .picture {
    background-image: url(../img/character/matsunoakane_s.png?210726);
  }

  .sakamuramahiro .picture {
    background-image: url(../img/character/sakamuramahiro_s.png?210726);
  }

  .imaimasahiro .picture {
    background-image: url(../img/character/imaimasahiro_s.png?210726);
  }

  .nodakensuke .picture {
    background-image: url(../img/character/nodakensuke_s.png?210726);
  }

  .adachimomoka .picture {
    background-image: url(../img/character/adachimomoka_s.png?210726);
    padding-top: 132.217877%;
    background-position: bottom;
  }

  .shinozakichisato .picture {
    background-image: url(../img/character/shinozakichisato_s.png?210726);
    padding-top: 132.217877%;
    background-position: bottom;
  }

  .shimoyamakazuki .picture {
    background-image: url(../img/character/shimoyamakazuki_s.png?210726);
  }

  #cast_dt {
    width: 90%;
    /* height: 94%; */
    /* height: max-content; */
    margin: 0px -45%;
    overflow: auto;
    /* border-radius: 10px; */
    padding-top: 3%;
  }

  #cast_dt #mainbox {
    margin: 2px auto;
    padding: 0 0 .5em;
  }

  .btn-w-close a {
    margin: 0 auto 1em;
    background-color: #000;
  }

  #cast_dt h1 {
    width: 100%;
    margin: .2em auto 2%;
    padding: 3% 0 1.8% 0;
  }

  #cast_dt h1:before {
    height: 70%;
  }

  #cast_dt h1 span.castname {
    width: 90%;
    height: 0;
    padding: 13% 0 0;
    background-size: contain;
  }

  #cast_dt .photo {
    width: 60%;
    height: 0;
    padding: 75% 0 0;
    margin: 0 auto 5%;
    position: relative;
  }

  #cast_dt .photo img {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
  }

  #cast_dt .txt {
    font-size: 4vw;
    padding: 0.5em 1em 1em;
    background-color: #fff;
  }
}

#cast_dt .txt {
  line-height: 1.8;
  /* height: max-content; */
  /* background-color: #fff; */
  margin-bottom: 1.5em;
}

#cast_dt .txt {
  line-height: 1.65;
  /* background-color: #fff4f4; */
  /* border: solid 1em #fff4f4; */
  /* padding: 1em; */
  /* border-radius: 5px; */
  /* border: solid 1px #ffbad8; */
  /* margin-top: 1em; */
  font-weight: bold;
  color: #6a3906;
  font-family: fot-tsukuardgothic-std, sans-serif;
  /* font-weight: 400; */
  font-style: normal;
  -ms-text-size-adjust: 100%;
  font-kerning: normal;
  font-feature-settings: "palt";
}

@media all and (min-width: 768px) {
  #cast_dt .txt {
    position: absolute;
    left: 333px;
    top: 210px;
    height: 175px;
    width: 328px;
    overflow: auto;
    font-size: 15.7px;
    padding-right: 0.9em;
  }
}

.chart div.wrap {
  box-sizing: border-box;
  background-color: #fff;
}

.chart_menu {
  background-color: #fff;
  box-sizing: border-box;
}

.ch_switch {
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
}

.ch_switch a {
  position: absolute;
  overflow: hidden;
  white-space: nowrap;
  text-indent: 110%;
}

@media all and (min-width: 768px) {
  .chart div.wrap {
    /* padding: 0 0 22px; */
    width: 980px;
  }

  .chart_menu {
    padding: 22px 0 0;
    width: 980px;
    margin: 0 auto;
  }

  .ch_switch {
    width: 980px;
    height: 130px;
    margin: 30px auto 0;
  }

  .ch_switch a {
    width: 233px;
    height: 56px;
    right: 0;
    bottom: 17px;
  }
}

@media all and (max-width: 767px) {
  .chart div.wrap {
    /* padding: 0 2% 2%; */
  }

  .chart_menu {
    padding: 2% 2% 0;
    width: auto;
    margin: 0 auto;
  }
}
