/* ショップページ全体 */
.shop-page {
    max-width: 900px;
    margin: 0 auto;
}

.shop-page__header {
    margin-bottom: 20px;
}

.shop-page__title {
    margin-bottom: 6px;
}

.shop-page__lead {
    margin: 0 0 10px;
    color: #5f5a55;
    font-size: 0.95rem;
}

.shop-page__status {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: #4f453d;
    font-size: 0.92rem;
}

.shop-page__status span {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
    box-shadow: 0 1px 4px rgba(70, 55, 45, 0.06);
}

/* 販売セクション */
.shop-section {
    margin-top: 18px;
}

.main-content h2.shop-section__title,
.shop-section__title {
    margin: 0 0 12px;
    padding: 0;
    border-bottom: none;
    color: #3f332c;
    font-size: 1.18rem;
}

.shop-item-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.shop-empty {
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.68);
    color: #6b625a;
    text-align: center;
}

/* 販売アイテムカード */
.shop-item-card {
    display: flex;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(120, 105, 90, 0.24);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 2px 8px rgba(70, 55, 45, 0.06);
}

.shop-item-card__image-wrap {
    flex: 0 0 auto;
    width: 60px;
    height: 60px;
}

.shop-item-card__image {
    display: block;
    width: 60px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
}

.shop-item-card__content {
    flex: 1 1 auto;
    min-width: 0;
}

.shop-item-card__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.main-content h3.shop-item-card__name,
.shop-item-card__name {
    margin: 0;
    padding: 0;
    border-bottom: none;
    color: #3f332c;
    font-size: 1.08rem;
}

.shop-item-card__price {
    flex: 0 0 auto;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(90, 78, 66, 0.10);
    color: #4b4038;
    font-weight: 700;
}

.shop-item-card__body-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.shop-item-card__description {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.65;
}

.shop-item-card__description--empty {
    color: #8a8179;
}

/* 購入フォーム */
.shop-purchase-form {
    flex: 0 0 auto;
    margin: 0;
}

.shop-purchase-form__controls {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
}

.shop-purchase-form__quantity-label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #4f453d;
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
}

.shop-purchase-form__quantity-label span {
    white-space: nowrap;
}

.shop-purchase-form__quantity-input {
    box-sizing: border-box;
    width: 68px;
    padding: 6px 8px;
    border: 1px solid rgba(120, 105, 90, 0.35);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #3f332c;
    font: inherit;
    font-weight: 400;
}

.shop-purchase-form__button {
    padding: 7px 18px;
    border: none;
    border-radius: 999px;
    background: #5d5148;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
}

.shop-purchase-form__button:hover,
.shop-purchase-form__button:focus-visible {
    background: #75685e;
    color: #fff;
}

.shop-purchase-form__button:active {
    background: #4a4039;
    color: #fff;
}

.shop-purchase-form__button:disabled,
.shop-purchase-form__button[disabled] {
    background: rgba(93, 81, 72, 0.28);
    color: rgba(255, 255, 255, 0.82);
    cursor: not-allowed;
}

@media (max-width: 640px) {
    .shop-item-card {
        flex-direction: column;
    }

    .shop-item-card__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .shop-item-card__body-row {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .shop-purchase-form {
        align-self: flex-end;
    }
}

/* アイテム作成フォーム */
.shop-create-card {
    padding: 16px;
    border: 1px solid rgba(120, 105, 90, 0.24);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 2px 8px rgba(70, 55, 45, 0.06);
}

.shop-create-card__lead {
    margin: 0 0 14px;
    color: #5f5a55;
    line-height: 1.7;
}

.shop-create-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shop-create-form__field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #4f453d;
    font-weight: 700;
}

.shop-create-form__field input,
.shop-create-form__field textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(120, 105, 90, 0.35);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    color: #3f332c;
    font: inherit;
    font-weight: 400;
}

.shop-create-form__field small {
    color: #7b6f66;
    font-size: 0.84rem;
    font-weight: 400;
}

.shop-create-form__checkbox {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #4f453d;
    font-size: 0.92rem;
}

.shop-create-form__button {
    align-self: flex-start;
    padding: 8px 18px;
    border: none;
    border-radius: 999px;
    background: #5d5148;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
}

.shop-create-form__button:hover,
.shop-create-form__button:focus-visible {
    background: #75685e;
    color: #fff;
}

.shop-create-form__button:disabled,
.shop-create-form__button[disabled] {
    background: rgba(93, 81, 72, 0.28);
    color: rgba(255, 255, 255, 0.82);
    cursor: not-allowed;
}

/* ショップ商品にも所持欄と同じアイテム種別を表示します。 */
.shop-item-card__title-group {
    min-width: 0;
}

.shop-item-card__type-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.shop-item-card__type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(96, 78, 62, 0.12);
    color: #5a4639;
    font-size: 0.76rem;
    font-weight: 700;
}

.shop-item-card__type-badge--consumable {
    background: rgba(166, 76, 58, 0.12);
    color: #853d31;
}

.shop-item-card__type-badge--non_consumable {
    background: rgba(49, 93, 135, 0.12);
    color: #315d87;
}

.shop-create-form__field select {
    box-sizing: border-box;
    width: 100%;
    padding: 7px 9px;
    border: 1px solid rgba(120, 105, 90, 0.35);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.86);
}

.shop-create-form__cost {
    font-size: 0.94rem;
}


/* 通常アイテム選択中は、使用時メッセージ欄を完全に非表示にします。 */
#shop-create-use-log-field[hidden] {
    display: none !important;
}

/* アイテム作成個数入力は、長い説明欄よりコンパクトに表示します。 */
.shop-create-form__field--quantity {
    max-width: 220px;
}

.shop-create-form__field--quantity input {
    width: 120px;
}

/* 一度作成したアイテムを再作成する一覧。新規作成フォームの下へまとめて表示します。 */
.shop-recreate-section {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(120, 105, 90, 0.20);
}

.main-content h3.shop-recreate-section__title,
.shop-recreate-section__title {
    margin: 0 0 6px;
    padding: 0;
    border-bottom: none;
    color: #3f332c;
    font-size: 1.05rem;
}

.shop-recreate-section__lead {
    margin: 0 0 14px;
    color: #6b625a;
    font-size: 0.9rem;
    line-height: 1.65;
}

.shop-recreate-item-card__owned {
    margin-top: 4px;
    color: #7b6f66;
    font-size: 0.82rem;
}

.shop-recreate-form {
    flex: 0 0 auto;
    margin: 0;
}

.shop-recreate-form__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px 10px;
}

.shop-recreate-form__cost {
    color: #5f554d;
    font-size: 0.86rem;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .shop-recreate-form {
        align-self: stretch;
    }

    .shop-recreate-form__controls {
        justify-content: flex-start;
    }
}
