/*==================================================*
 *  [ mainvisual ]
 *==================================================*/
.mainvisual {
    position: relative;
    contain: layout;
    @media screen and (min-width: 768px) {
        display: grid;
        grid-template-columns: 1fr 24.375rem;
        margin-top: 2.5rem;
        margin-inline: auto;
        width: calc(100% - 5rem);
    }
    @media print, screen and (min-width: 1280px) {
        width: 86.7%;
        max-width: 65rem;
    }
}
.mainvisual-swiper:not(.slider-thumbnail) {
    .swiper-slide {
        picture img {
            width: 100%;
            @media screen and (min-width: 768px) {
                object-fit: cover;
                height: 100%;
            }
        }
        a {
            display: block;
            height: 100%;
        }
        figure {
            height: 100%;
        }
        figcaption {
            display: inline-block;
            padding: 0.33em;
            position: absolute;
            right: 0.625rem;
            bottom: 1.875rem;
            font-size: 0.75rem;
            line-height: 1;
            color: var(--c-white);
            background-color: var(--c-black);
            border-radius: 0.25rem;
            @media screen and (min-width: 768px) {
                font-size: 0.875rem;
                bottom: 0.625rem;
            }
        }
    }
}
.mainvisual-swiper {
    position: relative;
    contain: layout;
    @media screen and (min-width: 768px) {
        border-radius: 1.5rem 0 0 1.5rem;
        overflow: hidden;
        height: 27.8125rem;
    }
}
.mainvisual-logo {
    position: absolute;
    left: 50%;
    @media screen and (max-width: 767px) {
        top: 25%;
        width: 20%;
        transform: translate(-50%, 0);
    }
    @media screen and (min-width: 768px) {
        top: 50%;
        width: 22.89%;
        transform: translate(-50%, -50%);
    }
    img {
        width: 100%;
        filter: drop-shadow(0 0 0.625rem rgba(0, 0, 0, 0.8));
    }
}
.mainvisual-swiper:has(.swiper-slide-visible a[href="/about/"]) {
    .mainvisual-copy {
        visibility: hidden;
    }
}
.mainvisual-copy {
    position: absolute;
    top: 20%;
    left: 3rem;
    right: 3rem;
    font-weight: bold;
    text-align: center;
    line-height: 1.3;
    font-size: 4.8vw;
    color: var(--c-white);
    word-break: keep-all;
    text-shadow: 0 0 0.625rem rgba(0, 0, 0, 1);
    pointer-events: none;
    @media screen and (min-width: 768px) {
        top: 20%;
        font-size: 1.5rem;
    }
    @media screen and (min-width: 1280px) {
        left: 4.25rem;
        right: 4.25rem;
    }
    span {
        display: block;
        font-size: 0.5em;
        margin-top: 0.5em;
    }
}
.swiper-button-prev,
.swiper-button-next {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    contain: strict;
    pointer-events: auto;
    @media screen and (max-width: 767px) {
        top: calc(50% - 0.75rem);
    }
    @media (hover: hover) {
        &::before {
            transition: background-color 0.3s;
        }
        &:hover::before {
            background-color: var(--c-hover);
        }
    }
    &::before {
        content: '';
        position: absolute;
        left: 50%;
        top: 50%;
        translate: -50% -50%;
        color: var(--c-black);
        background-color: var(--c-white);
        border-radius: 50%;
        width: 100%;
        height: 100%;
        z-index: -1;
        @media screen and (max-width: 1279px) {
            width: 2.25rem;
            height: 2.25rem;
        }
    }
    img {
        width: 1rem !important;
    }
    &:after {
        content: none;
    }
}
.swiper-button-prev {
    @media only screen and (min-width: 1280px) {
        left: 1.25rem;
    }
    img {
        transform: rotate(180deg) scale(1, -1);
    }
}
.swiper-button-next {
    @media only screen and (min-width: 1280px) {
        right: 1.25rem;
    }
}
.swiper-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 2rem;
    contain: strict;
    border-radius: 0.5rem;
    background-color: var(--c-white);
    position: absolute;
    border: 1px solid var(--c-gray-10);
    z-index: 1;
    @media screen and (max-width: 767px) {
        left: 0.375rem;
        bottom: 1.875rem;
    }
    @media screen and (min-width: 768px) {
        left: 1.25rem;
        bottom: 1.25rem;
    }
    @media (hover: hover) {
        transition: background-color 0.3s;
        &:hover {
            background-color: var(--c-hover);
        }
    }
    img {
        @media screen and (max-width: 767px) {
            width: 1.25rem;
        }
    }
}
.swiper-wrapper {
    z-index: auto !important;
    will-change: transform;
}
.ttl-flag {
    @media screen and (max-width: 767px) {
        font-size: 0.875rem;
        margin-bottom: 1.1875rem;
    }
}
.vertical.ttl-flag > span {
    @media screen and (max-width: 767px) {
        padding: 0.9375rem 0.875rem;
    }
}
section:not(.mainvisual) .flag-parts {
    @media screen and (max-width: 767px) {
        height: 2.0625rem;
    }
}

/* [ 東京の11島地図 ] */
.maps-area {
    aspect-ratio: 390/445;
    width: 100%;
    position: relative;
    overflow: hidden;
    contain: layout;
    container-type: size;
    @media screen and (min-width: 768px) {
        border-radius: 0 1.5rem 1.5rem 0;
    }
    @media screen and (max-width: 767px) {
        margin-bottom: 1.25rem;
        margin-top: -1.5625rem;
        border-radius: 1.5rem 1.5rem 0 0;
        &::after {
            content: '';
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            background-size: cover;
            background-position: center bottom;
            background-repeat: no-repeat;
            aspect-ratio: 1/0.15384615;
            background-image: url(/mt-static/img/common/bg_wave_light_sp.svg);
        }
    }
    .thumbnail {
        position: absolute;
        &.oshima {
            left: 43.08cqw;
            top: 21.28cqw;
        }
        &.toshima {
            left: 9.487cqw;
            top: 30.51cqw;
        }
        &.niijima {
            left: 32.05cqw;
            top: 38.72cqw;
        }
        &.shikinejima {
            left: 2.56cqw;
            top: 44.1cqw;
        }
        &.kouzushima {
            left: 25.64cqw;
            top: 51.54cqw;
        }
        &.miyakejima {
            left: 50cqw;
            top: 58.72cqw;
        }
        &.mikurajima {
            left: 22.56cqw;
            top: 69.49cqw;
        }
        &.hachijojima {
            left: 31.54cqw;
            top: 80cqw;
        }
        &.aogashima {
            left: 31.54cqw;
            top: 92.56cqw;
        }
        &.chichijima {
            left: 80.26cqw;
            top: 76.16cqw;
        }
        &.hahajima {
            left: 80.26cqw;
            top: 89.23cqw;
        }
        &.oshima,
        &.niijima,
        &.kouzushima,
        &.miyakejima,
        &.chichijima,
        &.hahajima {
            .island-name::after {
                left: -0.3125rem;
                border-top: 3px solid transparent;
                border-bottom: 3px solid transparent;
                border-right: 6px solid var(--c-white);
            }
        }
        &.toshima,
        &.shikinejima,
        &.mikurajima,
        &.hachijojima,
        &.aogashima {
            .island-name::after {
                right: -0.3125rem;
                border-top: 3px solid transparent;
                border-bottom: 3px solid transparent;
                border-left: 6px solid var(--c-white);
            }
        }
    }
    .island-name {
        position: relative;
        display: block;
        font-weight: bold;
        font-size: 3.6cqw;
        background-color: var(--c-white);
        border-radius: 0.71em;
        text-align: center;
        line-height: 1;
        padding: 0.57em 0.86em;
        flex-shrink: 0;
        cursor: pointer;
        contain: layout;
        &::after {
            content: '';
            position: absolute;
            top: calc(50% - 3px);
            display: block;
            width: 0;
            height: 0;
            border-style: solid;
        }
    }
    .icon-arrow-map {
        display: inline-block;
        vertical-align: middle;
        margin-right: 0.57em;
        margin-top: -0.28em;
        width: 0.5em;
    }
    .map-bg {
        position: absolute;
        inset: 0;
        pointer-events: none;
        @media screen and (max-width: 767px) {
            bottom: 0.5px; /* iOS Safariの隙間対策 */
            overflow: hidden;
        }
    }
    @media (hover: hover) {
        .swiper-slide:not(.swiper-slide-thumb-active) .island-name {
            transition: background-color 0.3s;
            &:hover {
                background-color: var(--c-hover);
                &::after {
                    border-left-color: var(--c-hover);
                    border-right-color: var(--c-hover);
                }
            }
        }
    }
    .swiper-slide-thumb-active {
        .island-name {
            background-color: var(--c-red);
            color: var(--c-white);
            &::after {
                border-left-color: var(--c-red) !important;
                border-right-color: var(--c-red) !important;
            }
            img {
                -webkit-filter: brightness(0) invert(1);
                filter: brightness(0) invert(1);
            }
        }
    }
    .swiper-wrapper {
        z-index: auto !important;
    }
    .slider-thumbnail {
        display: block;
        .swiper-wrapper {
            transform: none !important;
            transition: none;
        }
        .swiper-slide {
            position: absolute !important;
            transform: none;
            transition: none;
            opacity: 1 !important;
        }
    }
    .swiper-fade .swiper-slide {
        pointer-events: auto !important;
    }
    .filter-title {
        display: inline-block;
    }
    .buttons-islands {
        display: block;
    }
    .btn-about {
        display: flex;
        flex-direction: column;
        align-items: center;
        row-gap: 0.57em;
        position: absolute;
        right: 0.625rem;
        top: 0.625rem;
        padding: 1.36em 0;
        width: 7.14em;
        border-radius: 1em;
        border: 1px solid var(--c-gray-10);
        background-color: var(--c-white);
        font-size: 3.6cqw;
        font-weight: bold;
        line-height: 1;
        text-align: center;
        @media (hover: hover) {
            transition: background-color 0.3s;
            &:hover {
                background-color: var(--c-hover);
            }
        }
        img {
            width: 3.57em;
        }
    }
    .text-click {
        padding-right: 30.77cqw;
        position: absolute;
        left: 0.625rem;
        top: 0.625rem;
        font-size: 0.625rem;
        line-height: 1.5;
    }
}

/*==================================================*
  *  [ TOP ]
  *==================================================*/
#ranking {
    position: relative;
    margin-top: 5rem;
    .title {
        margin-block-end: 1rem;
        & + .text-note {
            margin-block-end: 2.5rem;
        }
    }
}
.ranking-search {
    display: flex;
    gap: 0.5rem;
    margin-top: 2.1875rem;
    margin-bottom: 3rem;
    @media screen and (max-width: 767px) {
        margin-bottom: 2.5625rem;
    }
}
.ranking-wrap {
    transition: opacity 0.3s ease-in-out;
    @media screen and (max-width: 1279px) {
        width: calc(100% + 5rem + 0.25rem);
        margin-right: -5rem;
        margin-left: -0.25rem;
        overflow-x: scroll;
        padding-left: 0.25rem;
    }
    @media screen and (max-width: 767px) {
        width: calc(100% + 1.25rem + 0.25rem);
        margin-right: -1.25rem;
    }
    + .btn {
        margin-inline: auto;
        margin-top: 2rem;
    }
    + .ttl-flag,
    + .scroll-wrap {
        margin-top: 3rem;
        @media screen and (max-width: 1279px) {
            margin-top: 3.4375rem;
        }
    }
    &:not(.filter) li:nth-child(n + 6) {
        display: none;
    }
}
.ranking-list {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    counter-reset: number 0;
    padding-top: 0.4rem;
    @media screen and (max-width: 1279px) {
        padding: 0;
        padding-top: 0.25rem;
    }
    li {
        display: block;
        border: 1px solid var(--c-gray-10);
        border-radius: 0.5rem;
        padding: 0.625rem 0.625rem 1.25rem;
        background-color: var(--c-white);
        position: relative;
        width: calc((100% - 2rem) / 5);
        flex-shrink: 0;
        transition: 0.3s;
        contain: layout;
        @media screen and (max-width: 1279px) {
            min-width: 9.5rem;
            padding: 0.5rem 0.5rem 0.5rem;
        }
        &::after {
            content: counter(number);
            counter-increment: number 1;
            position: absolute;
            top: -0.25rem;
            left: -0.25rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 2.25rem;
            height: 2.25rem;
            line-height: 1rem;
            font-size: 1.25rem;
            border-radius: 50%;
            font-weight: bold;
            aspect-ratio: 1;
            color: var(--c-white);
            font-family: Helvetica, sans-serif;
            background-color: var(--c-black);
            contain: strict;
            @media screen and (max-width: 1279px) {
                font-size: 1.125rem;
                width: 2rem;
                height: 2rem;
            }
        }
        &.hidden {
            display: none;
        }
        &:nth-of-type(1)::after {
            background-color: var(--c-gold) !important;
        }
        &:nth-of-type(2)::after {
            background-color: var(--c-silver) !important;
        }
        &:nth-of-type(3)::after {
            background-color: var(--c-bronze) !important;
        }
        &:has(a) {
            @media(hover: hover) {
                transition: background-color 0.3s;
                &:hover {
                    background-color: var(--c-hover);
                }
            }
        }
    }
    h3 {
        font-size: 1.125rem;
        margin-top: 1.1875rem;
        font-weight: bold;
        @media screen and (max-width: 1279px) {
            font-size: 1rem;
        }
    }
    .image {
        position: relative;
        flex-shrink: 0;
        aspect-ratio: 1/1;
        contain: layout;
        overflow: hidden;
        img {
            object-fit: cover;
            width: 100%;
            height: 100%;
        }
        span:not(.copyright) {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            position: absolute;
            top: 0.5rem;
            right: 0.5rem;
            color: var(--c-green);
            background-color: var(--c-white);
            border: 1px solid var(--c-gray-10);
            text-align: center;
            height: 1.0625rem;
            line-height: 1.0625rem;
            border-radius: 9999px;
            font-weight: bold;
            padding-inline: 0.5rem;
            font-size: 0.75rem;
            @media screen and (max-width: 1439px) {
                top: 0.25rem;
                right: 0.25rem;
            }
        }
        .copyright {
            display: inline-block;
            position: absolute;
            bottom: 0;
            left: 0;
            background-color: rgba(255, 255, 255, 0.7);
            font-size: 0.625rem;
            text-align: left;
        }
    }
    a::after {
        content: '';
        position: absolute;
        inset: 0;
    }
}
.tag {
    margin-top: 0.625rem;
    color: var(--c-gray-20);
    font-size: 0.75rem;
    @media screen and (max-width: 1279px) {
        font-size: 0.6875rem;
    }
}
.ranking-search-wrap {
    @media screen and (max-width: 767px) {
        width: calc(100% + 1.25rem);
        margin-right: -1.25rem;
    }
}
.ranking-search-wrap::after,
.ranking-list::after {
        @media screen and (max-width: 1279px) {
        content: '';
        display: block;
        min-width: 1.25rem;
    }
}
.ranking-wrap.filter figcaption {
    display: none;
}
.scroll-wrap {
    @media screen and (max-width: 1279px) {
        position: relative;
        margin-right: calc(50% - 50vw);
    }
}
.scroll {
    @media screen and (max-width: 1279px) {
        position: absolute;
        right: 0.5rem;
        bottom: -1.125rem;
        display: block;
        font-size: 0.6875rem;
        font-weight: 400;
    }
}
.icon-scroll {
    @media screen and (max-width: 1279px) {
        display: inline-block;
        margin-right: 0.1.875rem;
        vertical-align: middle;
    }
}

/* [ about ] */
.about {
    position: relative;
    contain: layout;
    container-type: inline-size;
    background-color: var(--c-beige-20);
    &::before,
    &::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
    &::before {
        top: 0;
        transform: scale(-1, 1);
    }
    &::after {
        bottom: 0;
        transform: none;
    }
    .btn {
        @media screen and (max-width: 1279px) {
            margin-inline: auto;
        }
    }
}
.about-wrap {
    display: flex;
    flex-direction: column-reverse;
    width: 100%;
    gap: 4.5rem 5rem;
    padding-inline: 1.25rem;
    margin-inline: 0;
    max-width: none;
    @media only screen and (min-width: 1280px) {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
        padding-inline: 6.5%;
        max-width: 81.375rem;
        margin-inline: auto;
    }
    @media screen and (min-width: 768px) and (max-width: 1279px) {
        padding-inline: 5rem;
    }
    @media screen and (min-width: 768px) {
        padding-block: calc(15cqw + 1.25rem);
    }
    @media screen and (max-width: 767px) {
        padding-block: calc(15.38cqw + 1.25rem);
    }
}
.about-text {
    .title,
    p + p {
        margin-bottom: 1.6875rem;
    }
    p + p {
        margin-top: 1.625rem;
    }
    > p {
        font-weight: 400;
        line-height: 2;
    }
    p {
        @media screen and (max-width: 767px) {
            line-height: 1.9;
        }
    }
}
.report {
    @media screen and (min-width: 1280px) {
        width: 50.5%;
    }
}


/* [ special ] */
#special {
    @media screen and (min-width: 768px) {
        margin-top: 5rem;
    }
    @media screen and (max-width: 767px) {
        margin-top: 3rem;
    }
}
.special-wrap {
    @media only screen and (min-width: 1440px) {
        display: flex;
        justify-content: space-between;
        column-gap: 2.5rem;
    }
    .title {
        @media only screen and (min-width: 1440px) {
            width: 18.125rem;
        }
    }
}
.special-list {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.5rem;
    margin-top: 0 !important;
    @media screen and (min-width: 768px) {
        flex-direction: row;
        gap: 1.25rem;
    }
    li {
        @media only screen and (min-width: 1440px) {
            max-width: 33.7rem;
        }
        @media screen and (min-width: 768px) {
            width: 50%;
        }
    }
}

/* [ news ] */
.news {
    padding: 1.5rem 1.25rem;
    background-color: var(--c-white);
    border: 1px solid var(--c-gray-10);
    border-radius: 0.875rem;
    @media screen and (max-width: 767px) {
        margin-top: 3rem;
    }
    @media screen and (min-width: 768px) {
        margin-top: 5rem;
    }
    h2 {
        margin-bottom: 1rem;
        font-size: 1.5rem;
        font-weight: bold;
        line-height: 1.2;
        @media screen and (max-width: 767px) {
            font-size: 1.25rem;
        }
    }
}
.news-list {
    display: grid;
    @media screen and (min-width: 768px) {
        grid-template-columns: auto 1fr;
        column-gap: 1rem;
    }
    > li {
        padding-block: 1rem;
        position: relative;
        &:not(:last-child) {
            border-bottom: 1px solid var(--c-gray-10);
        }
        @media screen and (min-width: 768px) {
            display: grid;
            grid-template-columns: subgrid;
            grid-column: span 2;
        }
        @media(hover: hover) {
            &:has(a) h3 {
                transition: color 0.3s;
                &:hover {
                    color: var(--c-green-hover);
                }
            }
        }
        > span {
            display: flex;
            column-gap: 0.5rem;
            align-items: center;
            font-size: 0.75rem;
            color: var(--c-gray-20);
            line-height: 1;
            @media screen and (min-width: 768px) {
                align-self: flex-start;
                margin-top: 0.375rem;
                span {
                    margin-top: -1px;
                }
            }
            @media screen and (max-width: 767px) {
                margin-bottom: 0.625rem;
            }
            time {
                font-family: var(--f-en);
            }
        }
    }
    h3 {
        font-size: 1rem;
        font-weight: 500;
        line-height: 1.2;
        &:has(a[href$=".pdf"])::before {
            content: 'PDF';
            display: inline-block;
            text-align: center;
            width: 2.4375rem;
            font-weight: bold;
            background-color: var(--c-black);
            color: var(--c-white);
            font-size: 0.6875rem;
            border-radius: 100vmax;
            margin-top: -0.1875rem;
            margin-right: 0.3125rem;
            vertical-align: middle;
        }
        &:has(a[target="_blank"]:not([href$=".pdf"]))::after {
            content: '';
            display: inline-block;
            margin-left: 0.125rem;
            width: 0.75rem;
            aspect-ratio: 1/1;
            background-image: url('/mt-static/img/common/icon_blank.svg');
            background-position: center;
            background-repeat: no-repeat;
            background-size: contain;
        }
    }
    a::after {
        content: '';
        position: absolute;
        inset: 0;
    }
}
