/* ───────── 카드 레이아웃 ───────── */
.item-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px
}

.item-card {
    width: calc(50% - 8px);
    position: relative;
    border: 1px solid #ddd;
    background: #fff
}

/* ───────── 썸네일 ───────── */
.item-thumb {
    position: absolute;
    right: 40px;
    top: 28px
}

.item-thumb img {
    display: block;
    width: auto;
    height: auto;
    max-width: 90px
}

/* 본문(썸네일 피하기) */
.item-body {
    padding: 10px 14px 10px 29px;
    margin-right: 140px
}

/* ───────── 텍스트 ───────── */
.item-name {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 2px
}

.item-meta {
    font-size: .8rem;
    margin-bottom: 4px;
    color: #555
}

.item-magic {
    font-size: .8rem;
    margin: 4px 0;
    color: #2e7d32
}

/* 획득 경로 & 설명 : 썸네일 폭 포함 */
.item-acq,
.item-desc,
.opt-table {
    width: calc(100% + 140px);
    margin-right: -140px
}

/* 획득 경로 박스 */
.item-acq {
    white-space: pre-line;
    line-height: 1.4;
    margin: 8px 0 4px;
    padding: 6px 10px;
    border: 1px solid #ccc;
    background: #fafafa;
    font-size: .8rem
}

/* 설명 */
.item-desc {
    padding: 6px 10px;
    font-size: .8rem;
    color: #666;
    text-align: center
}

/* ───────── 배지 ───────── */
.badge {
    display: inline-block;
    font-size: .72rem;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 4px;
    color: #fff
}

.badge-period {
    background: #ff7043
}

.badge-trade {
    background: #26a69a
}

.badge-notrade {
    background: #9e9e9e
}

.badge-stack {
    background: #ffa000
}

.badge-attr {
    background: #607d8b
}

.badge-grade-rare {
    background: #ab47bc
}

.badge-grade-legend {
    background: #ffb300;
    color: #000
}

/* ───────── 스탯 표 ───────── */
.opt-table {
    border-collapse: collapse
}

.opt-table th,
.opt-table td {
    border: 1px solid #ccc;
    padding: 6px 10px;
    text-align: center;
    font-size: .9rem;
    width: 25%
}

.opt-table th {
    background: #f3f3f3;
    font-weight: 600
}

/* ───────── 버튼(아이콘만) ───────── */
.btn-search,
.btn-reset,
.btn-toggle {
    border: none;
    background: transparent;
    color: #212529;
    padding: 0 5px;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer
}

.btn-search:hover,
.btn-reset:hover,
.btn-toggle:hover {
    color: #212529
}

/* ───────── 반응형 : ≤640 px ───────── */
@media(max-width:640px) {
    .item-card {
        width: 100%;
        padding-top: 110px
    }

    /* 위쪽 공간 확보 */
    .item-thumb {
        position: absolute;
        right: 50%;
        transform: translateX(50%);
        top: 10px;
        width: 90px;
        height: 90px
    }

    .item-thumb img {
        width: 100%;
        height: 100%;
        object-fit: contain
    }

    .item-body {
        margin-right: 0;
        padding: 10px
    }

    /* 썸네일 영역 안 비움 */
    .item-acq,
    .item-desc,
    .opt-table {
        width: 100%;
        margin-right: 0
    }

    /* 폭 100% */
}