.card-grid.tool {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    /* スマホ */
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

@media screen and (min-width: 768px) {
    .card-grid.tool {
        grid-template-columns: repeat(2, 1fr);
        /* タブレット以上のサイズで2列になるように設定
        親要素の1/2になるよう設定されているため、.card側でwidthは100%以外設定しない */
    }
}

.card-grid.tool.tool-wide {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    /* スマホ時は1列 */
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

@media screen and (min-width: 768px) {
    .card-grid.tool.tool-wide {
        grid-template-columns: repeat(2, 1fr);
        /* PCでは2列 */
    }

    .card-long {
        grid-column: span 2;
        /* 1つ目は2列分使う */
        display: block;
    }

}

.card-long,
.card {
    display: flex;
    justify-content: center;
    /* 縦方向の中央寄せ */
    align-items: center;
    /* 横方向の中央寄せ（テキストを中央に） */
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px;
    width: 100%;
    height: 260px;
    /* 高さをそろえるためにmin, maxを指定 */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.card img {
    margin: 10px auto;
}


/* カード本文のベース */
.tool-sub {
    font-size: 1.5rem;
    line-height: 1.5;
    font-weight: bold;
    text-align: center;
    height: 130px;

}

/* 太字・強調部分 */
.highlight-text {
    font-weight: bold;
    font-size: clamp(20px, 3vw, 47px);
    color: #C01F17;
    /* 画面サイズに応じて調整 */
}

.main-text {
    font-weight: bold;
    font-size: clamp(20px, 3vw, 30px);
}

.tool-min {
    font-size: 18px;
    font-weight: 600;
    text-align: left;
}

.headline {
    margin: auto;
    width: 40%;
    max-width: 700px;
}

.tool {
    width: 50%;
}

.tool-title {
    font-size: 50px;
    font-family: serif;
    text-align: center;
}

.tool-titlesecond {
    font-size: 50px;
    font-family: serif;
    text-align: center;
}

.tradersgym-button {
    background-color: #C01F17;
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    padding: 10px;
    border-radius: 10px;
}

@media screen and (max-width: 1650px) {
    .card {
        width: 300px;
        height: 50px;
        padding-top: 0 !important;
        /* 上の余白をなくす */

    }


    .highlight-text {
        font-size: 33px;
    }

    .highlight-text {
        width: auto;
    }

    .highlight-text {
        padding: 0px;
        font-size: 35px;
    }

    .tool-sub {
        font-size: 20px;
        height: 100px;
    }

    .section-tools {
        padding: 50px;
    }

    .section-toolssecond {
        padding: 50px 100px;
    }

    .tool-min {
        font-size: 16px;
    }

    .main-text {
        font-size: 25px;

    }

}

@media screen and (max-width: 768px) {

    .section-tools,
    .section-toolssecond {
        flex-direction: column;
        align-items: center;
        display: flex;
    }

    .tool {
        width: 100%;
        max-width: 400px;
        /* 任意で最大幅制限 */
        margin-bottom: 30px;
    }

    .tool-title,
    .tool-titlesecond {
        font-size: 40px;
        width: 100%;
        font-weight: bold;
    }

    .headline {
        width: 100%;
        padding: 20px;
        /* order: 2; */
        /* スマホ版で順番を下に移動.ただし.section-tools側でdisplay:flexとflex-direction: columnが必要 */
    }

    .card-grid {
        order: 1;
        /* スマホ版で順番を下に移動 */
    }

    .card-long {
        display: block;
        height: auto;
        max-height: none;
    }

    .highlight-text {
        font-size: 35px;
    }

    .main-text {
        font-size: 27px;
    }

    .tradersgym-img {
        padding-top: 10px;
    }
}



@media screen and (max-width: 600px) {
    .section-tools {
        padding: inherit;
    }

    .section-toolssecond {
        padding: 10px;

    }

    .card {
        width: auto;
    }

    p a {
        width: 310px;
    }
    .tool-min {
        text-align: center;
    }
}