
section ul{display:flex;flex-wrap:wrap;margin:30px auto;}
section ul.final{display:block;flex-wrap:wrap;margin:50px auto;}
section ul.yonretsu li{width:calc(100%/4 - 40px);margin:20px 20px 40px;}
section ul.sanretsu li{width:calc(100%/3 - 40px);margin:20px 20px 40px;}
section ul.niretsu li{width:calc(100%/2 - 40px);margin:20px 20px 40px;}
section ul.final li{width: calc(70%);margin: 20px auto 0;}

section#gallery ul{text-align: center; align-items: baseline;}
section#gallery ul img{width: auto; max-height: 100%; max-width: 100%;}
section#gallery ul li h4{border-bottom:1px solid #C18F3A;font-size:22px;font-weight:normal;margin:0px;}
section#gallery ul li p{font-size:16px;line-height:1.5em;margin:10px 0;padding:0px;}

@media all and (min-width: 0px) and (max-width: 767px) {
section ul{margin:20px auto;}
section ul.yonretsu li,
section ul.sanretsu li,
section ul.niretsu li{width:44%;margin:2vw 3% 4vw;}
section#gallery ul img{width: 100%;}
section#gallery ul li h4{font-size:4vw;line-height:1.5em;}
section#gallery ul li p{font-size:2.5vw;margin:1vw 0;}
}

.subpage h2.h_list {
	position: relative;
	margin: 0 auto 20px;
  font-size: 32px;
	font-weight: 700;
  color: #000;
}

.subpage h2.h_list::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 1px;
	background: #666;
}

.niretsu {}
.niretsu li h3 {
	text-align: center;
	font-size: 22px;
	border-bottom: 1px solid #ddd;
}
.niretsu li h3 span {
	font-size: 14px;
	margin-left: 10px;
}
.niretsu li h4 {
    font-size: 16px;
    font-weight: normal;
    text-align: right;
    margin: 0 0 10px;
    border-bottom: 1px solid #ddd;
    line-height: 1.8;
}
.niretsu li p {
	font-size: 18px;
	line-height: 1.4;
}
.niretsu li div {
    clear: both;
    display: flex;
    flex-wrap: wrap;
}
.niretsu li div a {
	width: 32%;
	padding: 1px 5px 2px;
	margin: 5px 2% 10px 0;
	text-align: center;
	display: block;
	background: #7e318e;
	border-radius: 3px;
	color: #fff;
	line-height: 1.5;
    box-sizing: border-box;
}
.niretsu li div a:nth-child(3) {
	margin: 5px 0 10px;
}
.niretsu li div a.keibajo {
	padding-top: 3%;
}

.niretsu li a.yusyou,
.niretsu li a.yusyou2{
	text-align: center;
	display: block;
	padding: 2px 5px;
	margin: 10px 0 0;
	background: black;
	border-radius: 3px;
	color: white;
	font-size: 24px;
}
.niretsu li a.yusyou::before {
	content: "昨年優勝馬";
	margin-right: 5px;
	font-size: 0.7em;
}
.niretsu li a.yusyou2::before {
	content: "一昨年優勝馬";
	margin-right: 5px;
	font-size: 0.7em;
}
.niretsu li a.rekidai {
	text-align: center;
	display: block;
	padding: 5px 5px;
	margin: 0;
	font-size: 20px;
}

.final li h3 {
	color: #eb363a;
	text-align: center;
	font-size: 22px;
	border-bottom: 1px solid #eb363a;
}
.final li h3 span {
	font-size: 14px;
	margin-left: 10px;
}
.final li h4 {
    font-size: 16px;
    font-weight: normal;
    text-align: right;
    margin: 0 0 10px;
    color: #000;
    border-bottom: 1px solid #eb363a;
		line-height: 1.8;
}
.final li p {
	font-size: 18px;
	line-height: 1.4;
}
.final li div {
    clear: both;
    display: flex;
    flex-wrap: wrap;
}
.final li div a {
	width: calc(100%/3 - 21px);
	padding: 2px 5px;
	margin: 5px 5px 10px;
	text-align: center;
	display: block;
	background: #eb363a;
	border-radius: 3px;
	color: white;
	line-height: 1.5;
}
.final li div a.keibajo {
	padding-top: 3%;
}

.final li a.yusyou {
	text-align: center;
	display: block;
	padding: 2px 5px;
	margin: 10px 0 0;
	background: black;
	border-radius: 3px;
	color: white;
	font-size: 24px;
}

.time {
	margin: 7px 0 15px;
	padding: 2px 0;
	background-color: #eee;
}


@media all and (min-width: 0px) and (max-width: 767px) {
	section ul.final {margin: 20px auto;}
	section ul.niretsu li{width:100%;margin:2vw 0 4vw;}
	.niretsu li div a {font-size: 14px;}
	.niretsu li a.yusyou {font-size: 5vw; padding: 5px 0px;}
	.niretsu li a.rekidai {font-size: 16px;}

	section ul.final li{width:100%;margin:2vw 0 4vw;}
	.final li div a {font-size: 14px;}
	.final li a.yusyou {font-size: 5vw; padding: 5px 0px;}
	.final li a.rekidai {font-size: 16px;}

	.subpage h2.h_list {
	  font-size: 25px;
	}

}
