#now_selling_brand {
    background-color: #f7ecdb;
    padding: 40px 3cqw;
}

@media screen and (max-width: 768px) {
    #now_selling_brand {
        padding: 40px 1em;
    }
}

#now_selling_brand img {
    width: 100%;
}

.now_selling_brand__inner {
    border-radius: 12.5px;
    margin: 0 auto 0;
    position: relative;
}

#archText span:first-child,
#archText span:last-child {
    font-size: 1.4em;
}

.now_selling_brand__inner__block {
    background: #fff;
    padding: 12px 17.5px;
    margin-top: 4%;
    position: relative;
    border: 0.5px solid #7e7558;
    border-radius: var(--round-button, 4px);
    container-type: inline-size; /* cqwの基準として必須 */
}

.font-red {
    color: #e60012;
}

.now_selling_brand__inner__block .now_selling_brand__inner__block__flex__pic {
    /* max-width: 27.5%; */
    flex: 1;
}

.now_selling_brand__inner__block__flex {
    display: flex;
    align-items: center;
    gap: 3.7cqw;
}

.now_selling_brand__inner__block__flex__chart {
    position: relative;
    flex: 3;
}

.now_selling_brand__inner__block__flex__chart h3 {
    margin-bottom: 12px;
    min-height: 12cqw;
}

@media screen and (max-width: 768px) {
    .now_selling_brand__inner__block__flex__chart h3 {
        margin-bottom: 8px;
    }
}

.now_selling_brand__inner__block__flex__chart__2020,
.now_selling_brand__inner__block__flex__chart__2024 {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    line-height: 1;
}

.now_selling_brand__inner__block__flex__chart__2020 {
    margin-bottom: 4px;
}

.now_selling_brand__inner__block__flex__chart__2020 p:first-child,
.now_selling_brand__inner__block__flex__chart__2024 p:first-child {
    padding: 4px 6px;
    border-radius: 4px;
}

.now_selling_brand__inner__block__flex__chart__2020 p:first-child {
    background: #f3f3f3;
}

.now_selling_brand__inner__block__flex__chart__2024 p:first-child {
    background: var(--anothercolor-pale-red, #ffeded);
}
.now_selling_brand__inner__block__flex__chart__2024 p:nth-child(2) {
    display: flex;
    align-items: center;
    gap: 2px;
}
.now_selling_brand__inner__block__flex__chart__2024 p:nth-child(2) strong {
    color: #e60012;
}

/* ==========================================================================
   【修正・最適化】バッジエリアの新しいスタイル（縦書きバグを完全排除）
   ========================================================================== */
.now_selling_brand__inner__block__flex__badge {
    position: absolute;
    right: 8px;
    bottom: 6px;
    z-index: 2;

    /* バッジ自体の丸枠サイズ */
    width: 20cqw;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #ab9f71;
    color: #fff;

    /* 内部要素を上下左右中央揃え */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    padding: 4px;
}

/* 数字と「万円」の横並びブロック */
.now_selling_brand__inner__block__flex__badge .badge-main {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 1px;
    width: 100%;
}

/* 数字（倒れずにまっすぐ立ちます） */
.now_selling_brand__inner__block__flex__badge .badge-num {
    font-weight: 900;
    line-height: 0.85;
    letter-spacing: -0.04em;
    font-size: 7.5cqw;
}

/* 3桁（170万など）の時に自動で縮小させてハミ出しを防ぐ安全弁 */
.now_selling_brand__inner__block__flex__badge .badge-num.num-3 {
    font-size: 5.8cqw;
    letter-spacing: -0.06em;
}

/* 「万円」エリア（改行による擬似縦書き） */
.now_selling_brand__inner__block__flex__badge .badge-unit {
    font-family: serif;
    font-size: 2.2cqw;
    line-height: 1.05;
    font-weight: 700;
    text-align: center;
    margin-top: 2px;
}

/* 下段の「UP!」 */
.now_selling_brand__inner__block__flex__badge .badge-up {
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.05em;
    margin-top: 4px;
    font-size: 3cqw;
}

/* ＝ 古いバッジ（writing-mode等）の干渉記述はここから完全に削除しました ＝ */

.now_selling_brand__inner__block__flex__pic {
    grid-area: 1 / 1 / 3 / 2;
}

.now_selling_brand__inner__block__flex__text {
    background-color: #f1f1f1;
    border-radius: 24px;
}

.now_selling_brand__inner__block__flex__arrow {
    grid-area: 2 / 2 / 3 / 3;
}

.now_selling_brand__inner__block__flex__arrow {
    color: #fff;
    font-size: calc(0.0227px * var(--price-width));
    font-weight: bold;
    line-height: 1;
    width: calc(0.2516px * var(--price-width));
    aspect-ratio: 3.0625;
    padding-left: 6%;
    background: url(../img/bag_price/arrow-sp.png) no-repeat center / contain;
    display: flex;
    align-items: center;
}

.now_selling_brand__inner__block__flex__arrow strong {
    font-size: calc(0.046px * var(--price-width));
}

.now_selling_brand__inner__block__flex__price {
    margin-left: 1%;
    position: relative;
    z-index: 2;
}

.now_selling_brand__inner__block__flex__price p {
    font-size: calc(0.0216px * var(--price-width));
    font-weight: 700;
    line-height: 1;
}

.now_selling_brand__inner__block__flex__price p:last-child {
    font-size: calc(0.0243px * var(--price-width));
    position: relative;
}

.now_selling_brand__inner__block__flex__price p:last-child::after {
    content: "";
    width: 61%;
    height: calc(0.0159px * var(--price-width));
    background: #ffff00;
    bottom: 3%;
    left: 0;
    position: absolute;
    z-index: -1;
}

.now_selling_brand__inner__block__flex__price .font-red {
    font-size: calc(0.0363px * var(--price-width));
    font-weight: 800;
    letter-spacing: -0.02em;
}

.now_selling_brand__inner__block__flex__price .font-red strong {
    font-size: calc(0.1075px * var(--price-width));
    font-weight: 900;
    letter-spacing: -0.04em;
}

.now_selling_brand__inner__block__flex__badge .font-yellow {
    color: #ffff00;
}

.now_selling_brand__inner_memo {
    text-align: left;
    margin-top: 2%;
    margin-bottom: 4%;
    font-size: var(--font-s);
}

.purchase-result-under-area {
    margin-top: 16px;
}

@media screen and (max-width: 768px) {
    .now_selling_brand__inner__block__flex__chart .double_chevron {
        height: 24px;
    }

    .banner__inner__block__flex__price {
        grid-area: 1 / 3 / 3 / 4;
    }

    .now_selling_brand__inner__block__flex__arrow span {
        font-size: calc(0.0276px * var(--price-width));
    }

    .now_selling_brand__inner__block__flex__price {
        padding: 2%;
        display: flex;
        justify-content: center;
        position: absolute;
        right: 15px;
        width: 41%;
        aspect-ratio: 2.4256;
        z-index: 1;
    }

    .now_selling_brand__inner__block__flex__price::before {
        content: "";
        width: 100%;
        height: 100%;
        background: #fff;
        border-radius: 5px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        position: absolute;
        z-index: -1;
    }

    .now_selling_brand__inner__block__flex__price::after {
        content: "";
        width: 100%;
        height: 100%;
        background-image: linear-gradient(to right, #e60012, #850012);
        box-shadow: 2px 2px 1px rgba(0, 0, 0, 0.5);
        border-radius: 5px;
        padding: 2px;
        box-sizing: content-box;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        position: absolute;
        z-index: -2;
    }

    .now_selling_brand__inner__block__flex__price p:first-child {
        top: 22%;
        left: 5%;
        position: absolute;
    }

    .now_selling_brand__inner__block:nth-of-type(3)
        .now_selling_brand__inner__block__flex__price
        p:first-child,
    .now_selling_brand__inner__block:nth-of-type(4)
        .now_selling_brand__inner__block__flex__price
        p:first-child {
        left: 13%;
    }

    .now_selling_brand__inner__block__flex__price .front {
        font-size: calc(0.0432px * var(--price-width));
    }

    .now_selling_brand__inner__block:nth-of-type(2)
        .now_selling_brand__inner__block__flex__price
        p:last-child::after {
        width: 67%;
    }
}
