.p2-main-grid {
    align-items: start;
}

.p2-warband::before {
    z-index: 0;
}

.p2-warband > .p2-panel__head,
.p2-warband > .p2-warband__grid {
    position: relative;
    z-index: 1;
}

.p2-warband__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 10px;
}

.p2-thug-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: visible;
    border-color: #29422f;
    background: rgba(2,8,4,.62);
    box-shadow: inset 0 0 18px rgba(0,0,0,.26);
}

.p2-thug-card:hover {
    transform: translateY(-1px) rotate(-.08deg);
    border-color: #52725a;
}

.p2-thug-card__portrait {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1.18;
    isolation: isolate;
    background: #061008;
}

.p2-thug-card__portrait::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: url('/assets/images/Ruined_Neon-Green_Cyberpunk_Metropolis.png') var(--city-x, 50%) 52% / 170% auto no-repeat;
}

.p2-thug-card__portrait img {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center bottom;
    background: transparent;
    filter: drop-shadow(0 8px 10px rgba(0,0,0,.72));
}

.p2-thug-card__body {
    min-width: 0;
    min-height: 56px;
    padding: 9px 9px 10px;
    background: rgba(2,8,4,.82);
}

.p2-thug-card__body strong,
.p2-thug-card__body span {
    display: block;
    max-width: 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
}

.p2-thug-card__body strong {
    font-size: 12px;
    line-height: 1.18;
}

.p2-thug-card__body span {
    margin-top: 4px;
    font-size: 8px;
    line-height: 1.3;
    letter-spacing: .08em;
}

@media (max-width: 900px) {
    .p2-warband__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .p2-warband__grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 12px;
    }

    .p2-thug-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        width: calc(50% - 5px);
        justify-self: center;
    }

    .p2-thug-card__body {
        min-height: 58px;
        padding: 8px 7px 9px;
    }

    .p2-thug-card__body strong {
        font-size: 11px;
    }

    .p2-thug-card__body span {
        font-size: 8px;
    }
}
