/* history.css */

#history {
    position: relative;
}

.history .bg {
    position: absolute;
    background: url(../images/history_bg.jpg) no-repeat top center;
    top: 0;
    z-index: -1;
    transform: translateZ(0);
}
.history .bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 114, 161, 0); 
    pointer-events: none;
    transition: background 0.05s linear; /* カクつき軽減 */
}
.history .bg::after {
    background: rgba(255, 114, 161, calc(var(--filter-opacity, 0) * 0.3));
}

.history .history_bottom {
    background: url(../images/history_bg_btm.png) no-repeat left TOP;
    width: 100%;
    height: 133px;
    margin-top: 30px;
}

#history * {
    font-family: 'M PLUS 1p';
}

.history h2 {
    width: 100%;
    height: 150px;
    background: url(../images/history_tit.svg) no-repeat top 20px center, linear-gradient(#764B4B , #4f381ee8 30% , #83444400 75%);
    pointer-events: none;
    margin: 0 0 -116px;
}

.history .btn_racerq {
    filter: drop-shadow(0 10px 15px #7f2600d6);
}

.history_wrap .history_list {
    position: relative;
}

.history_wrap .history_list .bg {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,#ffaaaa00,#ffaaaa80);
}

.history_wrap .toto {
    width: 350px;
    height: 482px;
    background: url(../images/history_totomaru.png) no-repeat center;
    margin: 0 20px 10px 0;
    flex-shrink: 0;
    animation: bobbing-fast 2.5s ease-in-out infinite;
}

.history_wrap .btn {
    width: 576px;
    height: 73px;
    background: url(../images/history_alljp_btn.png) no-repeat center;
    position: absolute;
    filter: drop-shadow(0 3px 6px #00000080);
    z-index: 2;
}

.history_wrap ul {
    display: flex;
    padding: 0;
    margin: 0;
}

.history_wrap li {
    position: relative;
}

.history_wrap .mida {
    font-size: 25px;
    font-weight: 900;
    line-height: 1.3em;
    margin: 0;
}

.history_wrap li .mida::before {
    content: '';
    display: inline-block;
    background: url(../images/history_icon.svg) no-repeat center;
    background-size: contain;
    width: 38px;
    height: 32px;
    position: relative;
    top: 5px;
    margin-right: 10px;
}
.history_wrap li .jp .mida::before {
    content: '';
    display: inline-block;
    background: url(../images/history_icon_jp.svg) no-repeat center;
    background-size: contain;
}

.history_wrap .txt p {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.25em;
    text-align: justify;
    letter-spacing: -1px;
    margin: 0;
    text-indent: -22px;
    padding-left: 35px;

}

.history_wrap li .nen {
    position: relative;
    width: 225px;
    height: 200px;
    background: linear-gradient(130deg,#605347,#968765);
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    line-height: 0.8em;
    padding-top: 25px;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    align-items: center;
    font-family: 'Oswald' !important;
    font-size: 60px;
    z-index: 1;
}

.history_wrap li .sphere {
    position: relative;
}
.history_wrap li .sphere::before {
    content: '';
    display: inline-block;
    width: 250px;
    height: 20px;
    background: #4f381e;
    position: absolute;
    transform: rotate(-17deg);
    left: -170px;
    top: 90px; 
    z-index: -1;
}
.history_wrap li:nth-child(even) .sphere::before {
    transform: rotate(17deg);
}

.history_wrap .loupe {
    background: url(../images/history_loupe.svg) no-repeat center;
    background-size: contain;
    width: 63px;
    height: 63px;
    position: absolute;
    z-index: 2;
}
.history_wrap .loupe a {
    width: 100%;
    height: 100%;
    display: inline-block;
    position: absolute;
}

.history_wrap li.photo a {
    width: 370%;
    height: 260%;
    right: 0;
    bottom: 0;
}

.history_wrap li .nen span {
    font-size: 43px;
    position: relative;
    top: 0.125em;
}
.history_wrap li .nen span.nengo {
    font-size: 23px;
    top: 0;
}
.history_wrap li .nen span.ans {
    font-size: 24px;
    color: #FFEC00;
    width: 100%;
    text-align: center;
    top: 0;
}

.history_wrap li a.pdf_link {
    background: url(../images/his_pdf_btn.svg) no-repeat center;
    background-size: contain;
    width: 100px;
    height: 110px;
    margin: auto;
    position: relative;
    top: 30px;
}

.history_wrap li a.pdf_link::after {
    content: 'パンフレットPDF';
    position: absolute;
    font-size: 20px;
    font-weight: 900;
    color: #EC5050;
    width: 175px;
    left: -25px;
    bottom: -30px;
}
.history_wrap li a.pdf_link.pdf_s::after {
    content: '出走表PDF';
    left: 5px;
    width: 150px;
}

.history_wrap li .photo_wrap {
    width: 225px;
    height: 165px;
    margin-top: -10px;
    z-index: 1;
    position: relative;
}
.history_wrap li .photo_wrap .thum{
    background: url(../images/history_thum1956.jpg) no-repeat center ,#726A35;
    background-size: contain;
    width: 193px;
    height: 136px;
    border: solid 4px #726A35;
    margin-left: 10px;
    position: relative;
}
.history_wrap li.p1959 .photo_wrap .thum { background: url(../images/history_thum1959.jpg) no-repeat center, #726A35; background-size: contain;}
.history_wrap li.p1964 .photo_wrap .thum { background: url(../images/history_thum1964.jpg) no-repeat center, #726A35; background-size: contain;}
.history_wrap li.p1965 .photo_wrap .thum { background: url(../images/history_thum1965.jpg) no-repeat center, #726A35; background-size: contain;}
.history_wrap li.p1970 .photo_wrap .thum { background: url(../images/history_thum1970.jpg) no-repeat center, #726A35; background-size: contain;}
.history_wrap li.p1971 .photo_wrap .thum { background: url(../images/history_thum1971.jpg) no-repeat center, #726A35; background-size: contain;}
.history_wrap li.p1972 .photo_wrap .thum { background: url(../images/history_thum1972.jpg) no-repeat center, #726A35; background-size: contain;}
.history_wrap li.p1975 .photo_wrap .thum { background: url(../images/history_thum1975.jpg) no-repeat center, #726A35; background-size: contain;}
.history_wrap li.p1976 .photo_wrap .thum { background: url(../images/history_thum1976.jpg) no-repeat center, #726A35; background-size: contain;}
.history_wrap li.p1982 .photo_wrap .thum { background: url(../images/history_thum1982.jpg) no-repeat center, #726A35; background-size: contain;}
.history_wrap li.p1985 .photo_wrap .thum { background: url(../images/history_thum1985.jpg) no-repeat center, #726A35; background-size: contain;}
.history_wrap li.p1986 .photo_wrap .thum { background: url(../images/history_thum1986.jpg) no-repeat center, #726A35; background-size: contain;}
.history_wrap li.p1989 .photo_wrap .thum { background: url(../images/history_thum1989.jpg) no-repeat center, #726A35; background-size: contain;}
.history_wrap li.p1999 .photo_wrap .thum { background: url(../images/history_thum1999.jpg) no-repeat center, #726A35; background-size: contain;}
.history_wrap li.p2002 .photo_wrap .thum { background: url(../images/history_thum2002.jpg) no-repeat center, #726A35; background-size: contain;}
.history_wrap li.p2014 .photo_wrap .thum { background: url(../images/history_thum2014.jpg) no-repeat center, #726A35; background-size: contain;}
.history_wrap li.p2015 .photo_wrap .thum { background: url(../images/history_thum2015.jpg) no-repeat center, #726A35; background-size: contain;}
.history_wrap li.p2020 .photo_wrap .thum { background: url(../images/history_thum2020.jpg) no-repeat center, #726A35; background-size: contain;}
.history_wrap li.p2023 .photo_wrap .thum { background: url(../images/history_thum2023.jpg) no-repeat center, #726A35; background-size: contain;}

.history_wrap .fancybox__caption {
    font-size: 1.5em !important;
}

/* 2025調整 */  /*色変更しない場合は非表示にしてください*/
.history_wrap li:last-child .sphere .nen {
    background: linear-gradient(130deg, #f93c0a, #ff9c0a);
}
.history_wrap li:last-child .sphere::before {
    background: linear-gradient(61deg, #4f381e 40%, #eb4b00 80%);
}

.history_wrap li:last-child p {
    position: relative;
    top: -85px;
}
.history_wrap a.ichiran {
    background: url(../images/history_ichiran_btn.png) no-repeat center;
    background-size: contain;
    width: 300px;
    height: 90px;
    position: absolute;
    top: 0;
    left: 50px;
}

/***********************************************************************
「★PC版 CSS★」ブラウザの幅が751px以上ならここの記述が有効になる
**********************************************************************/
@media all and (min-width: 751px) {

.pc_non {display: none !important}

#history {
    width: 1920px;
    /* height: 939px; */
    z-index: 1;
}

.history .bg {
    width: 1920px;
    height: 900px;
}

.history .btn_wrap {
    position: absolute;
    z-index: 2;
    left: 597px;
    bottom: -57px;
}

.history .btn_racerq {
    background: url(../images/history_racer_btn_sp.png) no-repeat center;
    background-size: contain;
    width: 409px;
    height: 111px;
}


.history h2 {
    position: relative;
    /* z-index: 1; */
}

.history_wrap {
    width: calc(100% - 60px);
    height: 761px;
    /* overflow-x: scroll; */
    margin: -50px 20px 0 20px;
}

/* .history_wrap::-webkit-scrollbar {
    height: 15px;
    background: #000;
    border-radius: 9px;
}
.history_wrap::-webkit-scrollbar-thumb {
    height: 15px;
    background: #FFCE0A;
    border-radius: 9px;
    cursor: pointer;
} */

.history_wrap .txt p {
    text-indent: -22px;
    padding-left: 35px;
}
.history_wrap .mida {
    text-indent: -43px;
    padding-left: 36px;
    margin-bottom: 6px;
}


.simplebar-scrollbar::before { background: #FFCE0A; border-radius: 9px; cursor: pointer; height: 15px;}
.simplebar-track {background: #000; border-radius: 9px; height: 15px;}
.simplebar-scrollbar.simplebar-visible::before {opacity: 1;}

.history_wrap .history_list {
    display: flex;
    align-items: center;
    /* padding: 0 20px 0 40px ; */
    min-width: max-content;
}

.history_wrap .btn {
    bottom: -55px;
    left: 5px;
    cursor: pointer;
}

.history_wrap li:not(:last-child) {
    margin-right: 15px;
    margin-bottom: -10px;
}

.history_wrap li {
    display: flex;
    flex-direction: column;
}

.history_wrap li:last-child {
    margin-right: 100px;
}
.history_wrap li:last-child .mida {
  margin-bottom: 90px;
}

.history_wrap li .txt {
    height: 220px;
    width: 300px;
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.history_wrap li:nth-child(even) .txt {
    justify-content: flex-start;
}

.history_wrap li:nth-child(even) a.pdf_link {
    top: 15px;
}

.history .btn_racerq:hover,
.history_wrap .btn:hover,
.history_wrap li a.pdf_link:hover,
.history_wrap li a.ichiran:hover {
    opacity: 0.75;
}

.history_wrap li .loupe {
    top: 0;
    right: 30px;
}
.history_wrap li:nth-child(even) .loupe {
    top: 165px;
}
.history_wrap li.photo .loupe {
    top: 335px;
    right: 60px;
}
.history_wrap li.photo:nth-child(even) .loupe {
    top: -55px;
}
.history_wrap li .loupe:hover::before {
    content: '';
    background: #FFff0040;
    backdrop-filter: brightness(1.5);
    display: inline-block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.history_wrap li:nth-child(even) {
    flex-direction: column-reverse;
    margin-top: 75px;
}
.history_wrap li .photo_wrap .thum{
    margin-top: 20px;
}
.history_wrap li:nth-child(even) .photo_wrap .thum{
    margin-top: 10px;
}

/* 共通：三角形ベース */
.history_wrap li .photo_wrap .thum::before,
.history_wrap li a.pdf_link::before {
  content: '';
  display: inline-block;
  background: #726A35;
  width: 26px;
  height: 22px;
  position: absolute;
}
/* 共通：三角形ベース */
.history_wrap li a.pdf_link::before {
  background: #eb5554 !important;
}

/* 奇数番目（上側に付ける）- thum */
.history_wrap li .photo_wrap .thum::before {
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  top: -25px;
  left: 83px;
}

/* 奇数番目（上側に付ける）- pdf_link */
.history_wrap li a.pdf_link::before {
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  top: -25px;
  left: 43px;
}

/* 偶数番目（下側に付ける） */
.history_wrap li:nth-child(even) .photo_wrap .thum::before {
  clip-path: polygon(0% 0%, 100% 0%, 50% 100%);
  top: auto;
  bottom: -25px;
}
.history_wrap li:nth-child(even) a.pdf_link::before {
  clip-path: polygon(0% 0%, 100% 0%, 50% 100%);
  top: auto;
bottom: -48px;
}


/* 2025調整 */
.history_wrap li:last-child .txt {
    width: 430px;
    margin-left: -10px;
}
.history_wrap li:last-child .sphere {
    margin-left: 70px;
}
.history_wrap li:last-child .sphere::before {
    width: 300px;
    left: -250px;
    transform: rotate(-14deg);
}

}


/***********************************************************************
「★SP版 CSS★」ブラウザの幅が750px以下ならここの記述が有効になる
**********************************************************************/
@media only all and (max-width: 750px) {

.sp_non {display: none !important}

.history .bg {
    background: url(../images/history_bg_sp.jpg) repeat-y top center;
    width: 100%;
    height: 100%;
}
.history .history_bottom {
    margin-top: -50px;
}

.history .btn_wrap {
    width: 100%;
    height: 250px;
    background: url(../images/his_btn_bg.svg) no-repeat center bottom;
    background-size: contain;
    margin-top: -20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.history .btn_racerq {
    background: url(../images/history_racer_btn_sp.png) no-repeat center;
    background-size: contain;
    width: 714px;
    height: 191px;
    filter: drop-shadow(0 10px 15px #9B476Ed6);
}


.history h2 {
    padding: 0px 38px;
    width: calc(100% - 76px);
    height: 400px;
    background: url(../images/history_tit_sp.svg) no-repeat top 37px center, linear-gradient(#764B4B, #4f381ee8 30%, #83444400 75%);
}

.history_wrap {
    padding: 0 38px;
    margin-top: -220px;
    overflow: hidden;
}

.history_wrap .toto {
    width: 470px;
    height: 380px;
    background: url(../images/history_totomaru_sp.png) no-repeat center;
    flex-shrink: 0;
    margin: 0 0 -40px;
    top: -40px;position: relative;
}

.history_wrap .btn {
    width: 289px;
    height: 197px;
    background: url(../images/history_alljp_btn_sp.png) no-repeat center;
    right: 0;
    top: 50px;
}

.history_wrap .history_list {padding-top: 50px;}

.history_wrap ul {
    flex-direction: column;
    padding: 90px 0px 260px;
}

.history_wrap li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}
.history_wrap li:nth-child(even) {
    flex-direction: row-reverse;
}

.history_wrap li .txt {
    width: 410px;
    height: 300px;
    margin-top: 55px;
    position: relative;
}
.history_wrap li.pnon .txt {
    top: -10px;
}
.history_wrap li .txt.jp {
    top: 15px;
}

.history_wrap li .mida {
    font-size: 36px;
    text-indent: -52px;
    padding-left: 52px;
    margin-bottom: 10px;
}

.history_wrap li .mida::before {
    width: 42px;
    height: 42px;
}

.history_wrap li .txt p {
    font-size: 30px;
    /* letter-spacing: -1.6px; */
    text-indent: -29px;
    padding-left: 52px;
    font-family: "fot-udkakugoc70-pro", sans-serif !important;
    font-weight: normal;
    font-synthesis: none; 
}

.history_wrap li .sphere {
    margin-top: 55px;
}

.history_wrap li .nen {
    width: 245px;
    height: 225px;
    font-size: 61px;
}
.history_wrap li .nen span {
    font-size: 44px;
}

.history_wrap li .sphere::before {
    width: 30px;
    height: 500px;
    transform: rotate(-47deg);
    transform-origin: center bottom;
    left: 110px;
    top: -450px;
}
.history_wrap li:nth-child(even) .sphere::before {
    transform: rotate(47deg) !important;
}

.history_wrap li a.pdf_link {
    background: url(../images/his_pdf_btn.svg) no-repeat center;
    background-size: contain;
    width: 130px;
    height: 150px;
    position: relative;
    top: -120px;
    left: 0;
}
.history_wrap li:nth-child(even) a.pdf_link {
    left: -10px;
    top: -180px;
}
.history_wrap li a.pdf_link::after {
    font-size: 28px;
    width: 230px;
    left: -30px;
    bottom: -40px;
}

.history_wrap li .loupe {
    width: 115px;
    height: 115px;
    left: -440px;
}
.history_wrap li:nth-child(even) .loupe {
    left: 575px;
}
.history_wrap li.photo .loupe {
    bottom: -70px;
}
.history_wrap li.long .loupe {
    bottom: -110px;
}

.history_wrap li.photo a {
    width: 230%;
    height: 210%;
}
.history_wrap li.photo:nth-child(odd) a {
    right: auto;
    left: 0;
}

.history_wrap li .photo_wrap {
    width: 265px;
}
.history_wrap li .photo_wrap .thum{
    width: 220px;
    height: 154px;
    top: -130px;
    LEFT: 37PX;
}
.history_wrap li.p1959 .loupe{ bottom: -120px;}
.history_wrap li.p1959 .photo_wrap .thum{ top: -90px;}
.history_wrap li.p1964 .loupe{ bottom: -140px;}
.history_wrap li.p1964 .photo_wrap .thum{top: -80px; right: -10px;}
.history_wrap li.p1970 .txt p{ letter-spacing: -0.7px;}
.history_wrap li.p1971 .loupe{ bottom: -100px;}
.history_wrap li.p1971 .photo_wrap .thum{ top: -110px;}
.history_wrap li.p1972 .loupe{ bottom: -130px;}
.history_wrap li.p1972 .photo_wrap .thum{ top: -90px;}
.history_wrap li.p1976 .loupe{ bottom: -150px;}
.history_wrap li.p1976 .photo_wrap .thum{ top: -80px;}
.history_wrap li.p1982 .loupe{ bottom: -160px;}
.history_wrap li.p1982 .photo_wrap .thum{ top: -62px;}
.history_wrap li.p1985 .loupe{ bottom: -60px;}
.history_wrap li.p1986 .loupe{ bottom: -110px;}
.history_wrap li.p1986 .photo_wrap .thum{ top: -96px;}
.history_wrap li.p1989 .loupe{ bottom: -50px;}
.history_wrap li.p1989 .photo_wrap .thum{ top: -160px;}
.history_wrap li.p2002 .loupe{ bottom: -180px;}
.history_wrap li.p2002 .photo_wrap .thum{ top: -30px;}
.history_wrap li.p2023 .loupe{ bottom: -150px;}
.history_wrap li.p2023 .photo_wrap .thum{ top: -80px;}
.history_wrap li.p2025 .mida{
    text-align: center;
}
.history_wrap li.p2025 .txt {
    margin-top: 0;
}

.history_wrap li.p1985 a ,
.history_wrap li.p1999 a ,
.history_wrap li.p2020 a 
{ width: 100%; height: 100%;}
.history_wrap li.p1985 .photo_wrap .thum,
.history_wrap li.p1999 .photo_wrap .thum,
.history_wrap li.p2020 .photo_wrap .thum
{ display: none;}


/* 2025調整 */
.history_wrap li:last-child {
    flex-direction: column-reverse;
    align-items: center;
    margin-top: -100px;
}
.history_wrap li:last-child .txt {
    width: 600px;
    height: 96px;
}
.history_wrap li:last-child .sphere::before {
    background: linear-gradient(153deg, #4f381e 40%, #eb4b00 80%);
    transform: rotate(3202deg);
    height: 300px;
    top: -270px;
    left: 100px;
}
.history_wrap li:last-child .photo_wrap {
    display: none;
}

.history_wrap a.ichiran {
    width: 480px;
    height: 145px;
    top: 90px !important;  
}

}

/***********************************************************************
Key frame
**********************************************************************/
.anime {
    opacity: 0;
}

@keyframes fade-in-bottom {
    0% {
    transform: translateY(50px);
    opacity: 0;
    }
    100% {
    transform: translateY(0px);
    opacity: 1;
    }
}

@keyframes scale-width {
    0% {
        transform: scaleX(0);
        transform-origin: center;
    }
    100% {
        transform: scaleX(1);
        transform-origin: center;
    }
}