.compare {
    margin: 15px auto;
    /* padding: 70px 50px; */
    padding: 0;
    padding-top: 16px;
    margin-bottom: 60px;
    background-color: transparent;
    max-width: unset;
    border-radius: 20px;
    border-bottom: 40px solid #ffe583;
}

.compare-title {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
    padding-bottom: 14px;
    margin-bottom: 0;
}

.compare__more {
    width: 100%;
    bottom: 60px;
    text-decoration: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.1) 25%, rgba(255, 255, 255, 0.95) 66%, rgba(255, 255, 255, 1) 80%)
}

.compare__more button {
    position: absolute;
    bottom: -20px;
    color: white;
    background: #BDBDBD;
    padding: 10px 50px;
    border-radius: 30px;
    border: none;
}

.compare .compare-img-title {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
}

.compare {
    position: relative;
    margin: 0 auto;
    width: 100%;
    max-width: 750px;
    /* padding: 0 5px 10px; */
    /* background-color: #876a0e; */
    font-size: 10px;
    margin-top: 20px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.compare-img_span {
    display: flex;
    max-width: 135px;
    min-width: 42px;
    justify-content: center;
    margin: 10px auto;
}

.compare-tabs__item-inner span {
    color: #BDBDBD;
}

.compare__title {
    margin-bottom: 5px;
    color: #fff;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
}

.compare__table {
    width: 100%;
    margin: auto;
    border-collapse: collapse;
}

.box-scroll-y {
    position: relative;
    max-height: 650px;
    overflow: hidden scroll;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.box-scroll-y .compare__head {
    position: sticky;
    top: -1px;
    z-index: 10;
}

.compare__table th,
.compare__table td {
    border: 1px solid #c4c4c4;
    background-color: #fff;
    padding: 2px;
    text-align: center;
}

.compare__head th {
    background-color: #eee;
    font-weight: normal;
    font-size: 10px;
}

.compare__site-name {
    font-size: 10px;
    line-height: 1.2;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.compare .compare__row.hidden {
    display: none;
}

.compare-tab-content:not(.compare-tab-content--active) .compare__more {
    display: none;
}

.compare__row td:nth-of-type(2) {
    width: 50px;
}

.compare__row td:nth-of-type(3) {
    width: 7em;
}

.compare__row td:last-of-type {
    width: 60px;
}

/* 総合Tab列幅 */
.compare-lp3 .compare__table--sougou .compare__head th:nth-of-type(2),
.compare-lp3 .compare__table--sougou .compare__row td:nth-of-type(2),
.compare-lp3 .compare__table--sougou .compare__head th:nth-of-type(3),
.compare-lp3 .compare__table--sougou .compare__row td:nth-of-type(3) {
    width: 50px;
}

.compare-lp3 .compare__row td:last-of-type {
    width: 45px;
}

.compare-lp3 .compare__head th:nth-of-type(1),
.compare-lp3 .compare__row td:nth-of-type(1) {
    width: 80px;
}

/* 取扱い求人・サービス内容Tab：中間3列を均等幅 */
.compare__table--kyujin .compare__head th:nth-of-type(2),
.compare__table--kyujin .compare__row td:nth-of-type(2),
.compare__table--kyujin .compare__head th:nth-of-type(3),
.compare__table--kyujin .compare__row td:nth-of-type(3),
.compare__table--kyujin .compare__head th:nth-of-type(4),
.compare__table--kyujin .compare__row td:nth-of-type(4),
.compare__table--service .compare__head th:nth-of-type(2),
.compare__table--service .compare__row td:nth-of-type(2),
.compare__table--service .compare__head th:nth-of-type(3),
.compare__table--service .compare__row td:nth-of-type(3),
.compare__table--service .compare__head th:nth-of-type(4),
.compare__table--service .compare__row td:nth-of-type(4) {
    min-width: 48px;
    margin: 0 auto;
}

.compare__rank {
    display: block;
    width: 100%;
    object-fit: scale-down;
    margin: auto;
}

.compare__logo {
    display: block;
    width: 60px;
    height: 17px;
    margin: 0 auto;
    object-fit: scale-down;
}

.compare__star {
    color: gold;
    font-size: 16px;
    font-weight: bold;
}

.compare__star span {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 30px;
    margin: auto;
}

.compare__star img {
    width: 10px;
    height: 10px;
}

.compare__table .compare-img {
    display: block;
    width: 40%;
    object-fit: scale-down;
    margin: 5px auto;
}

.compare__button {
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1/1;
    width: 60px;
    margin: 10px auto;
    padding: 0;
    border: none;
    border-radius: 5px;
    border-bottom: solid 3px #722222;
    background-color: #FF5050;
    color: #fff;
    font-size: 17px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
}

.compare__button-inner {
    color: #fff;
}

.compare__more {
    position: absolute;
    z-index: 2;
    bottom: 10px;
    right: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    /* width: calc(98% - 20px); */
    height: 66px;
    margin: 0 auto;
    padding-top: 1em;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.5) 25%,
            rgba(255, 255, 255, 0.95) 66%,
            rgba(255, 255, 255, 1) 80%);
    color: blue;
    font-size: 16px;
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
}

/* === Tab切替 === */
.compare-tabs {
    display: flex;
    gap: 0;
    margin: 0;
    font-size: 14px;
    justify-content: space-around;
    list-style: none;
    margin-top: -7px;
    padding: 0;
}

.compare-tabs__item {
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    padding: 7px;
    flex: 1;
    position: relative;
    padding: 8px 4px;
    color: #333;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    border-radius: 0;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, padding 0.2s;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    padding: 7px;
    margin-top: 7px;
    width: 33.33333%;
    background-color: #ffe583;
}

.compare-tabs__item:first-child {
    margin-right: -10px;
    padding-right: 10px;
}

.compare-tabs__item:last-child {
    border-top-right-radius: 15px;
    margin-left: -10px;
    padding-left: 10px;
}

.compare-tabs__item--active {
    background: #ffe583;
    color: #876a0e;
    padding-top: 16px;
}

.compare-tabs__arrow {
    display: none;
    color: #876a0e;
    font-size: 12px;
    line-height: 1;
}

.compare-tabs__item--active .compare-tabs__arrow {
    display: block;
}

.compare-tabs__item--active .compare-tabs__item-inner {
    background-color: #ffe583;
    font-weight: 700;
}

.compare-tabs__item--active .compare-tabs__item-inner span {
    color: #766547;
}

.compare-tabs__item-inner {
    background-color: #fff;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    margin-bottom: -11px;
    padding: 10px;
}

/* === Tabコンテンツ切替 === */
.compare-tab-content {
    display: none;
    position: relative;
}

.compare-tab-content--active {
    display: block;
    border: 17px solid #ffe583;
}

/* === 比較表内アイコン行（アイコン＋テキスト、縦並び） === */
.compare__icon-row {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    margin-bottom: 3px;
    font-size: 10px;
    line-height: 1.15;
}

.compare__icon-row:last-child {
    margin-bottom: 0;
}

.compare__icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    object-fit: contain;
    vertical-align: middle;
}

.compare__koyou-link {
    color: #00a1fff5;
    text-decoration: underline;
}

.compare__koyou-link:hover {
    opacity: 0.75;
}

.compare__table td.have_padding {
    padding: 5px 10px;
}

/* === エリア・登録利用料セル内の評価画像サイズ制限 === */
.compare__score-cell .compare-img {
    height: auto;
    margin: 0;
}

.compare__table td.compare__score-cell {
    font-size: 10px;
    line-height: 1.3;
    padding: 0 !important;
}

.compare__row--first td:first-child {
    border-left: 3px solid #ffe583;
}

.compare__row--first td:last-child {
    border-right: 3px solid #ffe583;
}

.compare__row--first td {
    background-color: #FDFFE1;
    border-bottom: 3px solid #ffe583;
    border-top: 3px solid #ffe583;
    min-width: 55px;
}

@media screen and (max-width: 767px) {

    /* SP: Tab */
    .compare-tabs {
        font-size: 11px;
        margin-top: -5px;
    }

    .compare-tabs__item {
        font-size: 11px;
        border-top-left-radius: 10px;
        border-top-right-radius: 10px;
        padding: 5px;
        margin-top: 5px;
        width: 33.33333%;
    }

    .compare-tabs__item:first-child {
        margin-right: -6px;
        padding-right: 6px;
    }

    .compare-tabs__item:last-child {
        border-top-right-radius: 10px;
        margin-left: -6px;
        padding-left: 6px;
    }

    .compare-tabs__item--active {
        padding-top: 10px;
        margin-top: -5px;
        width: 38%;
        font-size: 12px;
        z-index: 2;
    }

    .compare-tabs__arrow {
        font-size: 10px;
    }

    .compare-tabs__item-inner {
        border-top-left-radius: 7px;
        border-top-right-radius: 7px;
        margin-bottom: -8px;
        padding: 7px;
    }

    .compare-tab-content--active {
        border-width: 10px;
        border: 10px solid #ffe583;
    }

    .compare__icon {
        width: 14px;
        height: 14px;
    }

    /* SP: アイコン */
    .compare__icon-row {
        font-size: 10px;
    }

    .compare__score-cell .compare-img {
        width: 40%;
        max-width: 150px;
    }

    .compare__table td.compare__score-cell {
        width: 7em;
    }
}

@media screen and (min-width: 768px) {
    .compare {
        font-size: 14px;
    }

    .compare__head th,
    .compare__site-name {
        font-size: 14px;
    }

    .compare__table th,
    .compare__table td {
        padding: 5px;
    }

    .box-scroll-y {
        max-height: 850px;
    }

    .compare-lp3 .compare__table--sougou .compare__head th:nth-of-type(4),
    .compare-lp3 .compare__table--sougou .compare__row td:nth-of-type(4) {
        width: auto;
    }

    .compare-lp3 .compare__table--sougou .compare__row td:nth-of-type(3),
    .compare__table--sougou .compare__row td:nth-of-type(3) {
        width: 8em;
    }

    .compare__table td:last-of-type,
    .compare-lp3 .compare__table td:last-of-type {
        width: auto;
    }

    .compare__rank {
        width: 70%;
    }

    .compare__logo {
        width: 95px;
        height: 27px;
    }

    .compare__star {
        font-size: 20px;
    }

    .compare__star span {
        width: 80px;
    }

    .compare__star img {
        width: 15px;
        height: 15px;
    }

    .compare__more {
        height: 100px;
        font-size: 18px;
    }

    .compare__row--first td:first-child {
        width: 134px;
        height: 130px;
    }

    /* PC: アイコン */
    .compare__icon-row {
        font-size: 0.9rem;
        gap: 5px;
        margin-bottom: 4px;
    }

    .compare__icon {
        width: 25px;
        height: 25px;
    }

    /* PC: エリア・登録利用料 */
    .compare__score-cell .compare-img {
        width: 35%;
        height: auto;
    }

    .compare__table td.compare__score-cell {
        font-size: 13px;
        padding: 0;
    }

    /* PC: 取扱い求人・サービス内容Tab中間列 */
    .compare__table--kyujin .compare__head th:nth-of-type(2),
    .compare__table--kyujin .compare__row td:nth-of-type(2),
    .compare__table--kyujin .compare__head th:nth-of-type(3),
    .compare__table--kyujin .compare__row td:nth-of-type(3),
    .compare__table--kyujin .compare__head th:nth-of-type(4),
    .compare__table--kyujin .compare__row td:nth-of-type(4),
    .compare__table--service .compare__head th:nth-of-type(2),
    .compare__table--service .compare__row td:nth-of-type(2),
    .compare__table--service .compare__head th:nth-of-type(3),
    .compare__table--service .compare__row td:nth-of-type(3),
    .compare__table--service .compare__head th:nth-of-type(4),
    .compare__table--service .compare__row td:nth-of-type(4) {
        /* width: 1%;
        padding: 5px 25px 5px 21px; */
    }

    .compare-img_span {
        width: 110px;
        /* margin: 0 auto; */
    }

    /* PC: Tab */
    .compare-tabs__item {
        border-top-left-radius: 15px;
        border-top-right-radius: 15px;
        padding: 7px;
        margin-top: 7px;
        width: 33.33333%;
    }

    .compare-tabs__item--active {
        background-color: #ffe583;
        color: #fff;
        font-size: 19px;
        margin-top: -7px;
        width: 40.33333%;
        z-index: 2;
    }

    .compare-tabs__arrow {
        font-size: 14px;
    }
}

@media screen and (max-width: 767px) {
    .compare {
        margin-top: 0px;
    }

    .compare__button {
        font-size: 12px;
        width: 52px;
    }

    .compare__table td.have_padding {
        padding: auto 7px;
    }

    .compare__head th,
    .compare__site-name {
        font-size: 10px;
    }
}