/* ==================================================
   結婚相談所 比較表
================================================== */

.comparison-section {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    overflow: hidden;
    background: #fff;
}

.comparison-section__heading {
    width: 100%;
    margin: 0;
    padding: 0 10px;
    line-height: 0;
}

.comparison-section__heading img {
    display: block;
    width: 100%;
    height: auto;
}

.comparison-section__inner {
    padding: 10px 10px 0;
}

.comparison-scroll-wrap {
    position: relative;
    width: 100%;
}

/* 横スクロール領域 */
.comparison-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    scrollbar-color: #FD7E9C #f1f1f1;
}

.comparison-scroll::-webkit-scrollbar {
    height: 6px;
}

.comparison-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.comparison-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #FD7E9C;
}

/*
 * 表示領域に3社を収める
 * 460px ÷ 3列 = 約153.3px
 */
.comparison-table {
    --comparison-column-width: calc((100vw - 20px) / 3);

    width: calc(
        var(--comparison-column-width) * var(--company-count)
    );
    min-width: calc(
        var(--comparison-column-width) * var(--company-count)
    );

    border-top: 1px solid #bbb;
    border-left: 1px solid #bbb;
    color: #333;
    background: #fff;
}

@media (min-width: 480px) {
    .comparison-table {
        --comparison-column-width: calc(460px / 3);
    }
}

/* 共通の5列グリッド */
.comparison-table__companies,
.comparison-table__row {
    display: grid;
    grid-template-columns:
        repeat(
            var(--company-count),
            var(--comparison-column-width)
        );
}

/* 最上部：王冠・ロゴ・サイト名 */
.comparison-table__company {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 6px 6px 5px;
    border-right: 1px solid #bbb;
    border-bottom: 1px solid #bbb;
    text-align: center;
    background: #fff;
}

.comparison-table__company--rank-1 {
    background: #fffce7;
}

.comparison-table__crown {
    display: block;
    width: 38px;
    height: 38px;
    margin: 0 auto 5px;
    object-fit: contain;
}

.comparison-table__logo {
    display: flex;
    width: 100%;
    height: 62px;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border: 1px solid #d5d5d5;
    background: #fff;
}

.comparison-table__logo img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: contain;
}

.comparison-table__logo-placeholder {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.comparison-table__company-name {
    display: flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    padding-top: 4px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.25;
}
/* ピンクの項目見出し */
.comparison-table__section-title {
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    min-height: 36px;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    border-right: 1px solid #bbb;
    border-bottom: 1px solid #bbb;
    color: #fff;
    background: #FD7E9C;
}
/* 項目名を横スクロール中も表示画面の中央に固定 */
.comparison-table__section-title-text {
    position: sticky;
    left: 0;
    display: flex;
    width: min(calc(100vw - 20px), 460px);
    min-width: min(calc(100vw - 20px), 460px);
    min-height: 36px;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    box-sizing: border-box;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}

.comparison-table__section-title--price
.comparison-table__section-title-text {
    font-size: 16px;
}

/* 各データセル */
.comparison-table__cell {
    display: flex;
    min-width: 0;
    min-height: 94px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 7px;
    border-right: 1px solid #bbb;
    border-bottom: 1px solid #bbb;
    text-align: center;
    background: #fff;
}

.comparison-table__cell:first-child {
    background: #fffce7;
}

.comparison-table__evaluation-icon {
    display: block;
    width: 29px;
    height: 29px;
    margin: 0 auto 5px;
    object-fit: contain;
}

.comparison-table__text {
    width: 100%;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.comparison-table__text p {
    margin: 0;
}

.comparison-table__text br {
    line-height: 1.2;
}

/* 料金 */
.comparison-table__cell--price {
    min-height: 101px;
}

.comparison-table__price {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
}

/* 公式サイト */
.comparison-table__row--cta .comparison-table__cell {
    min-height: 77px;
}

.comparison-table__cell--cta {
    padding: 10px 8px;
}

.comparison-table__button {
    display: flex;
    width: 100%;
    min-height: 47px;
    align-items: center;
    justify-content: center;
    padding: 8px 5px;
    border-radius: 6px;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    background: linear-gradient(
        to bottom,
        #2DCB70 0%,
        #22B861 100%
    );
    box-shadow: 0 3px 0 #159e4f;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.comparison-table__button:hover {
    color: #fff;
    opacity: 0.9;
    transform: translateY(1px);
    box-shadow: 0 2px 0 #159e4f;
}

.comparison-table__button:active {
    transform: translateY(3px);
    box-shadow: none;
}

/* 注釈 */
.comparison-notes {
    margin-top: 7px;
    color: #8B8F96;
    font-size: 11px;
    line-height: 1.35;
}

.comparison-notes__item {
    margin: 0;
}

.comparison-notes__item + .comparison-notes__item {
    margin-top: 2px;
}

.comparison-notes__item p {
    margin: 0;
}

/* ==================================================
   スクロール案内
================================================== */

.comparison-scroll-guide {
    position: absolute;
    z-index: 10;
    top: 48%;
    left: 50%;
    display: flex;
    width: 145px;
    min-height: 92px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border-radius: 7px;
    color: #fff;
    text-align: center;
    pointer-events: none;
    background: rgba(30, 30, 30, 0.72);
    opacity: 0;
    transform: translate(-50%, -50%);
}

.comparison-scroll-guide.is-show {
    animation: comparison-guide-hide 4.2s ease forwards;
}

.comparison-scroll-guide__hand {
    width: 42px;
    height: 42px;
    margin: 0 auto 4px;
    transform: translateX(35px);
}

.comparison-scroll-guide__hand img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.comparison-scroll-guide.is-show .comparison-scroll-guide__hand {
    animation: comparison-hand-swipe 1.35s ease-in-out 2;
}

.comparison-scroll-guide.is-hidden {
    visibility: hidden;
    opacity: 0;
}

.comparison-scroll-guide__text {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}

@keyframes comparison-hand-swipe {
    0% {
        opacity: 0;
        transform: translateX(38px);
    }

    15% {
        opacity: 1;
    }

    75% {
        opacity: 1;
        transform: translateX(-38px);
    }

    100% {
        opacity: 0;
        transform: translateX(-38px);
    }
}

@keyframes comparison-guide-hide {
    0% {
        opacity: 0;
    }

    7% {
        opacity: 1;
    }

    78% {
        opacity: 1;
    }

    100% {
        visibility: hidden;
        opacity: 0;
    }
}

/* 小さい端末 */
@media (max-width: 374px) {
    .comparison-table__crown {
        width: 35px;
        height: 35px;
    }

    .comparison-table__logo {
        height: 61px;
    }

    .comparison-table__company-name {
        font-size: 14px;
    }

    .comparison-table__section-title {
        font-size: 17px;
    }

    .comparison-table__text {
        font-size: 13px;
    }

    .comparison-table__price {
        font-size: 14px;
    }

    .comparison-table__button {
        font-size: 15px;
    }
}