@charset "utf-8";

.divider::before {
    content: "";
    display: none;
    flex: 1;
    height: 3px;
    background-image: radial-gradient(circle, #999 6px, transparent 6px);
    background-size: 18px 3px;
    background-repeat: repeat-x;
}

.divider::after {
    content: "";
    display: block;
    flex: 1;
    height: 3px;
    background-image: radial-gradient(circle, #999 6px, transparent 6px);
    background-size: 18px 3px;
    background-repeat: repeat-x;
}

.divider .divider-text {
    margin-bottom: 0.5rem;
}

.divider .divider-text p {
    font-size: 2.0rem;
}

.contpack-list .divider {
    margin-top: 1rem;
}

.btn-addCart {
    padding: 0.3rem 1.5rem;
    border-radius: 3px;
    background: #750000;
    cursor: pointer;
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
    position: relative;
    margin-top: 0.5rem;
}

/* 一括追加対象にギフト商品が含まれる時だけtop.jsが表示する */
.bulk-includeGift {
    display: inline-flex;
    align-items: center;
    align-self: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.bulk-includeGift input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
}

.divider .btn-addCart:disabled,
.divider .btn-addCart.disabled {
    opacity: .4;
    cursor: not-allowed;
    /* pointer-eventsをnoneにするとクリックイベントごと拾えなくなり、
       押された時の「カートに追加できません」トーストが出せなくなるため外している */
    /* filter はSafariで要素ごとに合成レイヤーを確保させスクロールを重くするため使わない。
       この要素で色が変わるのは背景 #750000 だけ(文字と::before/::afterの画像は白のまま)なので、
       grayscale(100%) 後の色を直接指定する */
    background: #191919;
}

@media screen and (max-width:1024px) {
    .contpack-list .divider {
        margin-top: 1.5rem;
        margin-bottom: 0.5rem;
    }
}

@media screen and (max-width:769px) {
    .divider::after {
        content: "";
        display: block;
        flex: 1;
        height: 2px;
        background-image: radial-gradient(circle, #999 4px, transparent 4px);
        background-size: 14px 2px;
        background-repeat: repeat-x;
    }

    .divider .divider-text p {
        font-size: 1.8rem;
    }

    .btn-addCart {
        font-size: 1.0rem;
    }
}

/*--------------------------------------
           追想アイコン対応
--------------------------------------*/

.item div img.scene-icon {
    max-width: 70px;
    width: 100%;
}

.item div img.rarity-icon {
    position: absolute;
    bottom: -4px;
    right: -7px;
    z-index: 1;
    width: 18px;
}

.frame-wrapper {
    position: relative;
}

.frame-wrapper::after {
    content: "";
    position: absolute;
    inset: -2px;
    /* 上下左右にぴったり被せる */
    border: 22px solid transparent;
    /* フレーム幅に応じて設定 */
    border-image-slice: 40 fill;
    /* 40pxで四隅を固定、中央を引き延ばし */
    border-image-repeat: stretch;
    /* 伸ばす */
    pointer-events: none;
}

.frame-wrapper.lg::after {
    border-image-source: url("../img/character/frame_character_lg.png");
}

.frame-wrapper.ur2::after {
    border-image-source: url("../img/character/frame_character_ur.png");
}

.frame-wrapper.ur::after {
    border-image-source: url("../img/character/frame_character_ur.png");
}

.frame-wrapper.sr::after {
    border-image-source: url("../img/character/frame_character_sr.png");
}

.frame-wrapper.r::after {
    border-image-source: url("../img/character/frame_character_r.png");
}

.frame-wrapper.n::after {
    border-image-source: url("../img/character/frame_character_n.png");
}

@media screen and (max-width:1024px) {
    .frame-wrapper {
        width: 85%;
        margin: 0 auto;
    }

    .frame-wrapper::after {
        border: 17.5px solid transparent;
        border-image-slice: 40 fill;
        /* 40pxで四隅を固定、中央を引き延ばし */
        border-image-repeat: stretch;
    }

    .item div img.rarity-icon {
        bottom: -2px;
        right: -6px;
        width: 16px;
    }
}

@media screen and (max-width:768px) {
    .frame-wrapper {
        max-height: 19px;
    }

    .item div img.rarity-icon {
        position: absolute;
        bottom: -1px;
        right: -3px;
        z-index: 1;
        width: 8px;
    }

    .frame-wrapper::after {
        inset: -1px;
        border: 9px solid transparent;
        border-image-slice: 40 fill;
        /* 40pxで四隅を固定、中央を引き延ばし */
        border-image-repeat: stretch;
    }
}

@media screen and (max-width:475px) {
    .frame-wrapper {
        max-height: 18px;
    }
}

/*--------------------------------------
           積み荷ヘッダーデザイン変更
--------------------------------------*/

#tabcontrol {
    max-width: 525px;
    gap: 1rem;
    border-bottom: 2.5px solid #333;
}

.tab_item {
    margin-bottom: -2px;
}


input#treasure:not(:checked)+.tab_item,
input#pack:not(:checked)+.tab_item {
    border: 1px solid #cecece;
    box-shadow: 1px 4px 2px 0px #bbb3b3;
}

input#treasure:not(:checked)+.tab_item,
input#treasure:checked+.tab_item {
    border-radius: 3px 3px 0px 0;
}

input#pack:not(:checked)+.tab_item,
input#pack:checked+.tab_item {
    border-radius: 3px 3px 0px 0px;
}

.tab_item {
    padding: 4px 0;
}

input#pack:checked+.tab_item {
    color: #333;
    border-width: 1px;
    border-style: solid;
    border-color: #750000;
    border-image: initial;
    background: #750000;
    transform: translate(0px, 0px);
}

input#treasure:checked+.tab_item {
    color: #333;
    border-width: 2px;
    border-style: solid;
    border-left-width: 0;
    border-color: #750000;
    border-image: initial;
    background: #750000;
    transform: translate(0px, 0px);
}

input#pack:not(:checked)+.tab_item span,
input#treasure:not(:checked)+.tab_item span,
input#subscription:not(:checked)+.tab_item span {
    color: #333;
}

.tab_item span {
    font-weight: bold;
    color: #fff;
}

input#treasure:not(:checked)+.tab_item,
input#pack:not(:checked)+.tab_item,
input#subscription:not(:checked)+.tab_item {
    border: 1px solid #333;
    border-radius: 3px 3px 0px 0px;
    box-shadow: none;
}

input#pack:checked+.tab_item::before,
input#treasure:checked+.tab_item::before,
input#subscription:checked+.tab_item::before {
    content: "";
    position: absolute;
    background: url(../img/img_login.png);
    background-size: cover;
    width: 10px;
    height: 28px;
    left: 4px;
    top: 50%;
    transform: translate(0px, -50%);
}

input#pack:checked+.tab_item::after,
input#treasure:checked+.tab_item::after,
input#subscription:checked+.tab_item::after {
    content: "";
    position: absolute;
    background: url(../img/img_login.png);
    background-size: cover;
    width: 10px;
    height: 28px;
    right: 4px;
    top: 50%;
    transform: scale(-1.0) translate(0px, 50%);
}

@media screen and (max-width:768px) {
    input#pack:checked+.tab_item {
        border-width: 1px;
        border-right-width: 0;
        transform: translate(0px, 0px);
        border-radius: 2px 2px 0px 0px;
    }

    input#treasure:checked+.tab_item {
        border-width: 1px;
        border-left-width: 0;
        transform: translate(0px, 0px);
        border-radius: 2px 2px 0px 0px;
    }

    .custom-nav {
        padding: 10px 0px 14px;
    }

    input#pack:checked+.tab_item::before,
    input#treasure:checked+.tab_item::before,
    input#subscription:checked+.tab_item::before {
        width: 8px;
        height: 19px;
    }

    input#pack:checked+.tab_item::after,
    input#treasure:checked+.tab_item::after,
    input#subscription:checked+.tab_item::after {
        width: 8px;
        height: 19px;
    }

     input#treasure:not(:checked)+.tab_item,
    input#pack:not(:checked)+.tab_item,
    input#subscription:not(:checked)+.tab_item {
        border-radius: 2px 2px 0px 0px;
    }
}

/* スマホ版横向き */
@media screen and (max-width: 1024px) and (orientation: landscape) {
    input#pack:checked+.tab_item {
        border-width: 3px;
    }

    input#treasure:checked+.tab_item {
        border-width: 3px;
    }
}

/* --------------------------------------
           表示設定ボタン・モーダル
--------------------------------------*/

.display-option-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #333;
    border-radius: 3px;
    color: #333;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
}

.display-option-toggle:hover {
    background: #f5f5f5;
}

.display-option-icon {
    flex-shrink: 0;
}

@media screen and (max-width: 768px) {
    .display-option-toggle span {
        display: none;
    }

    .display-option-toggle {
        padding: 8px;
    }
}

.display-option-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 6000;
}

.display-option-overlay.show {
    display: block;
}

.display-option-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    /* 項目名+選択肢2つが1行に収まる幅を確保する */
    max-width: 560px;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-sizing: border-box;
    z-index: 6001;
}

.display-option-modal.show {
    display: block;
}

.display-option-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.display-option-modal-header h2 {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

.display-option-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: #333;
}

.display-option-group {
    padding: 12px 0;
}

.display-option-group + .display-option-group {
    border-top: 1px solid #eee;
}

.display-option-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    /* 項目名と選択肢はどちらも固定幅・折り返し無しのため、
       モーダル幅が足りないときは行を折り返して枠外へはみ出さないようにする */
    flex-wrap: wrap;
}

.display-option-label {
    /* 選択肢(1.1rem)より少し大きくし、左にアクセントの縦線を置いて目立たせる */
    display: flex;
    align-items: center;
    font-size: 1.3rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    margin: 0;
    padding-left: 8px;
    border-left: 3px solid #c8a84b;
    white-space: nowrap;
    /* 3項目(グレーアウト・売り切れ・ギフト内容)の文言の長さが違っても、
       ラジオボタンの位置が揃うよう固定幅にする(縦線と「？」マーク分を含む) */
    flex: 0 0 11.5rem;
}

/* 項目名の横に置く「？」マーク。ホバーで説明ツールチップを表示する */
.display-option-help {
    /* ツールチップの位置基準 */
    position: relative;
    display: inline-grid;
    place-content: center;
    box-sizing: border-box;
    flex-shrink: 0;
    width: 1.6rem;
    height: 1.6rem;
    margin-left: 6px;
    padding: 0;
    background: #fff;
    border: 1px solid #999;
    border-radius: 50%;
    color: #666;
    font-size: 1.1rem;
    font-weight: bold;
    line-height: 1;
    cursor: help;
    -webkit-tap-highlight-color: transparent;
}

.display-option-help.show-tooltip {
    background: #750000;
    border-color: #750000;
    color: #fff;
    outline: none;
}

.display-option-help::after,
.display-option-help::before {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

/* 吹き出し本体 */
.display-option-help::after {
    content: attr(data-tooltip);
    position: absolute;
    left: -4px;
    bottom: calc(100% + 8px);
    z-index: 10;
    width: max-content;
    max-width: 22rem;
    padding: 8px 10px;
    background: #333;
    color: #fff;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: normal;
    line-height: 1.4;
    white-space: normal;
    text-align: left;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* 吹き出しの三角 */
.display-option-help::before {
    content: "";
    position: absolute;
    left: 4px;
    bottom: calc(100% + 3px);
    z-index: 11;
    border: 5px solid transparent;
    border-top-color: #333;
}

/* タップ時は JS が付与する .show-tooltip で表示する(スマホ・タブレット) */
.display-option-help.show-tooltip::after,
.display-option-help.show-tooltip::before {
    opacity: 1;
    visibility: visible;
}

/* マウス操作の端末のみホバーで表示する。
   タッチ端末を :hover 対象に含めると、タップ後に表示が残る(sticky hover)ため分ける */
@media (hover: hover) and (pointer: fine) {
    .display-option-help:hover,
    .display-option-help:focus-visible {
        background: #750000;
        border-color: #750000;
        color: #fff;
        outline: none;
    }

    .display-option-help:hover::after,
    .display-option-help:hover::before,
    .display-option-help:focus-visible::after,
    .display-option-help:focus-visible::before {
        opacity: 1;
        visibility: visible;
    }
}

.display-option-choices {
    display: flex;
    flex-wrap: wrap; /* 選択肢が多い項目(スマホの表示件数)が枠外へはみ出さないようにする */
    gap: 12px;
    flex-shrink: 0;
}

.display-option-choice {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.1rem;
    cursor: pointer;
    white-space: nowrap;
}

.display-option-choice:first-child {
    /* 1つ目の選択肢も固定幅にして、2つ目のラジオボタンの位置も揃える
       (6文字程度のラベル+ラジオボタンでも収まる余裕を持たせる) */
    flex: 0 0 8.5rem;
}

/* 選択肢が3つ以上の項目は、全ての選択肢を同じ幅にして間隔をそろえる */
.display-option-choices.equal > .display-option-choice,
.display-option-choices.equal > .display-option-choice:first-child {
    flex: 0 0 6.5rem;
}

.display-option-choice input[type="radio"] {
    /* サイト全体の input[type="radio"]{display:none} を上書きして表示する */
    display: inline-grid;
    place-content: center;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 1.2rem;
    height: 1.2rem;
    margin: 0;
    padding: 0;
    border: 2px solid #cccccc;
    border-radius: 50%;
    outline: none;
    cursor: pointer;
    flex-shrink: 0;
}

.display-option-choice input[type="radio"]:checked {
    border-color: #750000;
}

.display-option-choice input[type="radio"]:checked::before {
    content: "";
    width: 0.7rem;
    height: 0.7rem;
    background: #750000;
    border-radius: 50%;
}

@media screen and (max-width: 480px) {
    .display-option-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    /* ラベルは選択肢と別の行になるため固定幅は不要。
       1つ目の選択肢は固定幅を維持し、選択肢は横並びのまま2つ目の位置を揃える */
    .display-option-label {
        flex-basis: auto;
    }

    .display-option-choice:first-child {
        flex: 0 0 9rem;
    }
}

/* 横向きのスマホ(幅は広いが高さが低い)でも適用されるよう、高さ基準の条件もORで含める */
@media screen and (max-width: 480px), screen and (max-height: 480px) {
    .display-option-label {
        font-size: 1.25rem;
        white-space: nowrap;
    }

    .display-option-choices {
        gap: 12px;
    }

    .display-option-choice {
        gap: 8px;
    }

    .display-option-choice input[type="radio"] {
        box-sizing: border-box;
        width: 1.6rem;
        height: 1.6rem;
        margin: 0;
    }

    .display-option-help {
        width: 1.8rem;
        height: 1.8rem;
        font-size: 1.2rem;
    }

    .display-option-help::after {
        font-size: 1.2rem;
        max-width: 20rem;
    }
}

.display-option-footer {
    padding: 12px 16px 16px;
    display: flex;
    justify-content: flex-end;
}

.display-option-apply {
    padding: 8px 24px;
    background: #c8a84b;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

.display-option-apply:hover {
    background: #b8943a;
}

/* --------------------------------------
           内容物検索モーダル
--------------------------------------*/

.item-search-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    flex-direction: column;
    width: 92%;
    max-width: 1400px; /* PCで商品を横4列並べられる幅 */
    /* 検索結果の件数で大きさが変わらないよう、高さは固定する */
    height: 90vh;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-sizing: border-box;
    z-index: 6001;
}

.item-search-modal.show {
    display: flex;
}

.item-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 10px;
    border: 1px solid #333;
    border-radius: 3px;
    font-size: 1.2rem; /* カテゴリ一覧のチップと同じ大きさ */
}

.item-search-body {
    flex: 1;
    min-height: 0;
    /* スクロールバーの有無(カテゴリの開閉で変わる)で、カテゴリのチップなどの横幅・折り返しが
       動かないよう、スクロールバーの分の幅を常に確保する */
    overflow-y: scroll;
    scrollbar-gutter: stable;
    /* 一番上・下までスクロールしたとき、背景のページへスクロールが伝わらないようにする */
    overscroll-behavior: contain;
    margin-top: 20px;
}

.item-search-message {
    font-size: 1.2rem;
    color: #666;
    margin: 8px 0;
}

.item-search-candidates {
    list-style: none;
    margin: 0;
    padding: 0;
}

.item-search-candidate {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 6px 8px;
    background: none;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
    cursor: pointer;
}

.item-search-candidate:hover {
    background: #f5f5f5;
}

/* 幅の広いアイコン(追想など)が商品名に被らないよう、枠を固定して内側に収める */
.item-search-pic {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    overflow: hidden;
}

.item-search-pic .icon-mount {
    width: 56px !important; /* mountCanvasがインラインで幅を指定するため上書きする */
}

.item-search-candidate-name {
    flex: 1;
    font-size: 1.4rem;
    font-weight: bold;
    color: #333;
    overflow-wrap: anywhere;
}

.item-search-candidate-count {
    flex-shrink: 0;
    font-size: 1.2rem;
    color: #666;
}

/* 結果の見出し: 左に戻るボタン、中央にタイトル、右に並び替えを置き、下に区切り線を引く */
.item-search-results-head {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 2px solid #ac7d24;
    /* 結果カードには内容物名を出さないため、スクロールしても何の検索結果かが分かるよう見出しを上に固定する */
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
}

/* 一覧へ戻る操作だと分かるよう、枠付きのボタンにする */
.item-search-back {
    justify-self: start;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #ac7d24;
    border-radius: 4px;
    font-size: 1.3rem;
    font-weight: bold;
    color: #8b6914;
    cursor: pointer;
}

.item-search-back:hover {
    background: #ac7d24;
    color: #fff;
}

.item-search-results-title {
    justify-self: center;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.item-search-results-name {
    color: #8b6914;
    font-size: 1.8rem;
}

.item-search-results-count {
    margin-left: 4px;
    padding: 2px 10px;
    border-radius: 999px;
    background: #ac7d24;
    color: #fff;
    font-size: 1.3rem;
    white-space: nowrap;
}

.item-search-results-head .item-search-sort {
    justify-self: end;
    padding: 6px 10px;
    font-size: 1.3rem;
}

.item-search-results {
    list-style: none;
    margin: 0;
    padding: 2px 6px 8px 2px; /* 枠の影が切れないように */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: 12px;
}

/* 枠は関連商品タブ・TOPの商品カードに合わせる */
.item-search-result {
    /* 商品名の文字サイズ。名前欄の高さ(2行分)もこの値から決めるので、変えるとカードの高さも連動する */
    --item-search-name-size: 1.2rem;
    cursor: pointer;
    border: 1px solid #ac7d24;
    border-radius: 7px;
    box-shadow: 4px 4px 4px 0 rgba(0, 0, 0, 0.45);
    background: #fff;
    overflow: hidden;
    /* 商品名の行数が違っても、内容物の個数・価格の位置が同じ高さにそろうよう、下端に寄せる */
    display: flex;
    flex-direction: column;
}

.item-search-result .banner-mount {
    width: 100%;
    background: #F2F0EC;
}

.item-search-result-name {
    font-size: var(--item-search-name-size);
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    padding: 4px 8px 0;
    overflow-wrap: anywhere;
    /* 商品名は2行分の高さに固定し、下の個数・価格の位置とカードの高さを常に一定にする。
       2行に収まらない長い名前は、文字サイズを縮めて収める(itemSearch.jsのFitItemSearchNames) */
    box-sizing: border-box;
    /* 文字サイズを縮めても高さが変わらないよう、emではなく変数(rem)で指定する(文字サイズ × 行間1.4 × 2行) */
    height: calc(var(--item-search-name-size) * 2.8 + 4px);
    overflow: hidden;
}

.item-search-result-info {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    padding: 2px 8px 6px;
    font-weight: bold;
    color: #333;
}

/* 個数と価格は同じ書体・大きさにそろえ、色で区別する。数字を読み取りやすくするため、ゴシック体の太字・等幅数字にする */
.item-search-result-quantity,
.item-search-result-price {
    font-family: "Noto Sans JP", sans-serif;
    font-size: 1.4rem;
    font-weight: bold;
    font-variant-numeric: tabular-nums;
}

/* 内容物の個数は1行に収める。入りきらない場合は文字サイズを縮める(itemSearch.jsのFitItemSearchNames) */
.item-search-result-quantity {
    flex: 1 1 0;
    min-width: 0;
    color: #8b6914;
    white-space: nowrap;
    overflow: hidden;
}

.item-search-result-price {
    flex-shrink: 0;
}

@media screen and (max-width: 768px) {
    .item-search-modal {
        padding: 14px;
    }

    .item-search-results {
        grid-template-columns: minmax(0, 1fr);
    }
}

.item-search-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.item-search-sort {
    flex-shrink: 0;
    padding: 4px 8px;
    border: 1px solid #333;
    border-radius: 3px;
    background: #fff;
    font-size: 1.2rem;
}

/* PCでは内容物名が太く見えすぎるため細くする(スマホは今のまま) */
@media screen and (min-width: 769px) {
    .item-search-candidate-name {
        font-size: 1.3rem;
        font-weight: normal;
    }

    .item-search-result-info {
        padding-top: 8px;
    }
}

/* カテゴリの絞り込み(横に並べ、足りなければ折り返す)。
   PCは文字が大きくなるため、間隔・余白も文字に合わせてremで広げる(スマホは従来の6px・4px 10pxのまま) */
.item-search-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.item-search-category {
    padding: 0.5rem 1.25rem;
    border: 1px solid #ac7d24;
    border-radius: 999px;
    background: #fff;
    color: #8b6914;
    font-size: 1.2rem;
    cursor: pointer;
}

.item-search-category.active {
    background: #ac7d24;
    color: #fff;
}

.item-search-more {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 8px;
    border: 1px solid #333;
    border-radius: 3px;
    background: #fff;
    font-size: 1.2rem;
    cursor: pointer;
}

/* 「すべて」のカテゴリ見出し(開閉) */
.item-search-group {
    border-bottom: 1px solid #e0e0e0;
}

/* PCは文字が大きくなるため、上下の余白も文字に合わせてremで広げる(スマホは従来の10px 8pxのまま) */
.item-search-group > summary {
    padding: 1.25rem 1rem;
    font-size: 1.4rem;
    font-weight: bold;
    color: #333;
    cursor: pointer;
}

.item-search-group > summary:hover {
    background: #f5f5f5;
}

@media screen and (min-width: 769px) {
    .item-search-group > summary {
        font-size: 1.3rem;
    }
}

/* スマホの表示件数は、一覧の件数制限が効く幅(475px以下。top.jsのmatchMediaと同じ)でだけ出す */
.display-option-sp-only {
    display: none;
}

@media screen and (max-width: 475px) {
    .display-option-sp-only {
        display: block;
    }
}

/* PC: 商品は横4列に並べる */
@media screen and (min-width: 1025px) {
    .item-search-results {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* スマホ: 1段目に戻る・並び替えを左右へ、2段目にタイトルを中央に置く */
@media screen and (max-width: 768px) {
    .item-search-results-head {
        grid-template-columns: auto 1fr;
    }

    .item-search-results-title {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

/* スマホ: タブ・表示設定・内容物検索を、左右の余白と各ボタン間の間隔を同じにして中央に揃える。
   タブは残りの幅いっぱいに広げ、ボタンは幅を固定する */
@media screen and (max-width: 768px) {
    #customNav .cont-top-btn {
        gap: 10px;
        padding: 0 18px;
        box-sizing: border-box;
        justify-content: center;
    }

    #customNav .cont-top-btn #tabcontrol {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        max-width: none;
    }

    #customNav .cont-top-btn .display-option-toggle {
        flex: 0 0 auto;
    }
}

/* スマホ: 商品名・内容物の個数・価格を大きくする */
@media screen and (max-width: 768px) {
    .item-search-result {
        --item-search-name-size: 1.6rem;
    }

    .item-search-result-quantity {
        font-size: 1.7rem;
    }

    .item-search-result-price {
        font-size: 1.8rem;
    }
}
