.chat-character-inventory {
    display: grid;
    gap: 18px;
    padding: 24px 0 4px;
    border-top: 1px solid rgba(118, 174, 164, 0.16);
    scroll-margin-top: 20px;
}

.chat-character-inventory__header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.chat-character-inventory__header h4,
.chat-character-inventory__group h5 {
    margin: 0;
    color: #edf2ec;
    font-family: "Montserrat", sans-serif;
    font-size: 0.86rem;
    font-weight: 800;
}

.chat-character-inventory__header h4 i,
.chat-character-inventory__group h5 i {
    width: 24px;
    color: #da9258;
    text-align: center;
}

.chat-character-inventory__header p,
.chat-character-inventory__empty {
    margin: 0;
    color: #9eb0ad;
    font-size: 0.76rem;
}

.chat-character-inventory__group {
    display: grid;
    gap: 10px;
}

.chat-character-inventory__group h5 {
    color: #63aaa0;
    font-size: 0.68rem;
    text-transform: uppercase;
}

.chat-character-inventory__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.chat-character-inventory__item {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
    min-height: 84px;
    padding: 12px;
    border: 1px solid rgba(118, 174, 164, 0.2);
    border-radius: 6px;
    background: #0d1b1e;
}

.chat-character-inventory__item-icon {
    display: inline-grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(118, 174, 164, 0.32);
    border-radius: 5px;
    color: #78bdb2;
    background: rgba(31, 70, 67, 0.46);
    font-size: 1rem;
}

.chat-character-inventory__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.chat-character-inventory__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 40px;
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid rgba(118, 174, 164, 0.36);
    border-radius: 5px;
    background: rgba(33, 73, 70, 0.46);
    color: #e8f2ee;
    font-family: "Inter", sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
}

.chat-character-inventory__action:hover:not(:disabled),
.chat-character-inventory__action:focus-visible {
    border-color: #78bdb2;
    background: rgba(44, 96, 90, 0.72);
}

.chat-character-inventory__action[data-confirmation="true"] {
    border-color: #d7ae62;
    background: rgba(94, 66, 28, 0.72);
    color: #fff1cd;
}

.chat-character-inventory__action:disabled {
    cursor: wait;
    opacity: 0.68;
}

.chat-character-inventory__feedback {
    min-height: 18px;
    margin: -4px 0 0;
    color: #aebfbb;
    font-size: 0.74rem;
}

.chat-character-inventory__feedback[data-tone="success"] {
    color: #9dcc98;
}

.chat-character-inventory__feedback[data-tone="warning"] {
    color: #e2bd75;
}

.chat-character-inventory__feedback[data-tone="error"] {
    color: #e59891;
}

.chat-character-inventory__item[data-equipped="true"] {
    border-left: 3px solid #8ebd8a;
}

.chat-character-inventory__item[data-equipped="true"] .chat-character-inventory__item-icon {
    border-color: rgba(142, 189, 138, 0.62);
    color: #b8d8b4;
}

.chat-character-inventory__item[data-kind="quest"] {
    border-left: 3px solid #d7ae62;
}

.chat-character-inventory__item[data-kind="quest"] .chat-character-inventory__item-icon,
.chat-character-inventory__item[data-kind="treasure"] .chat-character-inventory__item-icon {
    border-color: rgba(215, 174, 98, 0.58);
    color: #efc97f;
    background: rgba(82, 59, 26, 0.42);
}

.chat-character-inventory__item-copy,
.chat-character-inventory__item-heading {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.chat-character-inventory__item-heading {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
}

.chat-character-inventory__item-heading strong {
    overflow-wrap: anywhere;
    color: #d9e3df;
    font-size: 0.84rem;
}

.chat-character-inventory__quantity,
.chat-character-inventory__meta {
    color: #9eb0ad;
    font-size: 0.68rem;
    font-weight: 700;
}

.chat-character-inventory__item p {
    margin: 0;
    color: #b7c5c1;
    font-size: 0.76rem;
    line-height: 1.45;
}

@media (max-width: 768px) {
    .chat-character-inventory__header {
        display: grid;
        gap: 5px;
    }

    .chat-character-inventory__list {
        grid-template-columns: minmax(0, 1fr);
    }

    .chat-character-inventory__item {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .chat-character-inventory__actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }

    .chat-character-inventory__action {
        flex: 1 1 104px;
    }
}
