/* Dedicated visual Inventory & Equipment panel (tt/inventory_panel). */
.tt-inv-backdrop {
    z-index: 47;
}

.tt-inv-window {
    width: min(1040px, 94vw);
    max-height: min(86dvh, 820px);
    display: flex;
    flex-direction: column;
}

.tt-inv-gold-pill {
    margin-left: auto;
    margin-right: 12px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(240, 192, 120, 0.14);
    border: 1px solid rgba(240, 192, 120, 0.42);
    color: var(--tt-gold-hi);
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
}

.tt-inv-confiscated {
    margin: 10px 18px 0;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(185, 58, 58, 0.18);
    border: 1px solid rgba(220, 88, 88, 0.48);
    color: #ffd5d5;
    font-size: 0.9rem;
}

.tt-inv-layout {
    display: grid;
    grid-template-columns: minmax(340px, 1.05fr) minmax(320px, 1fr);
    gap: 18px;
    padding: 16px 18px 20px;
    overflow: hidden;
    flex: 1 1 auto;
    min-height: 0;
}

.tt-inv-equip-col,
.tt-inv-bag-col {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.tt-inv-equip-col {
    overflow-y: auto;
    padding-right: 4px;
}

.tt-inv-hero-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.tt-inv-face {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex: 0 0 44px;
    border: 1px solid rgba(240, 192, 120, 0.5);
}

.tt-inv-face img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 15%;
}

.tt-inv-hero-meta {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
}

.tt-inv-hero-meta strong {
    font-size: 0.98rem;
}

.tt-inv-hero-meta span {
    opacity: 0.72;
}

.tt-inv-stats-pills {
    margin-left: auto;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tt-inv-pill {
    font-size: 0.78rem;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    white-space: nowrap;
}

.tt-inv-attack-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.84rem;
    padding: 7px 10px;
    border-radius: 8px;
    background: rgba(240, 192, 120, 0.08);
    border: 1px solid rgba(240, 192, 120, 0.22);
    margin-bottom: 12px;
}

.tt-inv-attack-label {
    opacity: 0.75;
}

.tt-inv-attack-detail {
    opacity: 0.82;
    font-size: 0.8rem;
}

.tt-inv-note {
    font-size: 0.82rem;
    opacity: 0.75;
    margin: 0 0 10px;
}

.tt-inv-slots-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.tt-inv-slot {
    padding: 9px 10px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.025);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tt-inv-slot.is-filled {
    border-color: rgba(240, 192, 120, 0.34);
    background: rgba(240, 192, 120, 0.07);
}

.tt-inv-slot.is-empty {
    opacity: 0.6;
    border-style: dashed;
}

.tt-inv-slot.is-cursed {
    border-color: rgba(210, 72, 92, 0.55);
}

.tt-inv-slot-head {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.75;
}

.tt-inv-slot-ico {
    width: 14px;
    text-align: center;
    color: var(--tt-gold);
}

.tt-inv-attune {
    margin-left: auto;
    padding: 0 7px;
    height: auto;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.1);
    color: var(--tt-muted);
}

.tt-inv-attune.is-attuned {
    background: rgba(240, 192, 120, 0.24);
    border: 1px solid rgba(240, 192, 120, 0.55);
    color: var(--tt-gold-hi);
}

.tt-inv-slot-name {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.25;
}

.tt-inv-slot-empty {
    font-size: 0.8rem;
    font-style: italic;
    opacity: 0.65;
}

.tt-inv-slot-actions,
.tt-inv-card-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.tt-inv-bag-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.tt-inv-bag-head .tt-group-title {
    margin: 0;
}

.tt-inv-filters {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.tt-inv-filter {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: inherit;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 0.76rem;
    cursor: pointer;
}

.tt-inv-filter.is-active {
    background: rgba(240, 192, 120, 0.2);
    border-color: rgba(240, 192, 120, 0.56);
    color: var(--tt-gold-hi);
}

.tt-inv-bag-scroll {
    overflow-y: auto;
    flex: 1 1 auto;
    padding-right: 4px;
}

.tt-inv-bag-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tt-inv-card {
    padding: 10px 12px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tt-inv-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tt-inv-card-name {
    font-size: 0.92rem;
}

.tt-inv-card-slot {
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    opacity: 0.85;
}

.tt-inv-card-desc,
.tt-inv-card-facts,
.tt-inv-card-dormant,
.tt-inv-card-reason {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.78;
}

.tt-inv-card-reason {
    color: #f4a4a4;
}

.tt-root.is-touch .tt-inv-filter {
    min-height: 44px;
}

@media (pointer: coarse) {
    .tt-inv-filter {
        min-height: 44px;
    }
}

@media (max-width: 820px) {
    .tt-inv-layout {
        display: flex;
        flex-direction: column;
        overflow-y: auto;
    }
    .tt-inv-equip-col,
    .tt-inv-bag-col,
    .tt-inv-bag-scroll {
        flex: 0 0 auto;
        min-height: auto;
        overflow: visible;
    }
}
