.zb-acg-avatarbox-wrap {
    display: inline-block;
    position: relative;
    line-height: 0;
}

.zb-acg-avatarbox-wrap > img {
    position: relative;
    z-index: 1;
}

.avatarbox_Miniimgbox {
    display: block !important;
    position: absolute !important;
    inset: var(--zb-avatarbox-top, 0) 0 auto 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: contain !important;
    transform: scale(var(--zb-avatarbox-scale, 1.2)) !important;
    transform-origin: center !important;
    z-index: 5 !important;
    pointer-events: none !important;
    border-radius: 0 !important;
}

.zb-avatarbox-open {
    cursor: pointer;
}

.zb-avatarbox-modal[hidden] {
    display: none !important;
}

.zb-avatarbox-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.zb-avatarbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .58);
}

.zb-avatarbox-dialog {
    position: relative;
    width: min(760px, 100%);
    max-height: 86vh;
    overflow: hidden;
    background: var(--main-bg-color, #fff);
    color: var(--main-color, #222);
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}

.zb-avatarbox-head {
    min-height: 56px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(128, 128, 128, .2);
}

.zb-avatarbox-close {
    border: 0;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: inherit;
}

.zb-avatarbox-body {
    padding: 16px;
    max-height: calc(86vh - 56px);
    overflow: auto;
}

.zb-avatarbox-group + .zb-avatarbox-group {
    margin-top: 20px;
}

.zb-avatarbox-group h3 {
    font-size: 15px;
    margin: 0 0 10px;
}

.zb-avatarbox-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.zb-avatarbox-item {
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(128, 128, 128, .22);
    border-radius: 6px;
    text-align: center;
}

.zb-avatarbox-preview {
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zb-avatarbox-preview img {
    max-width: 72px;
    max-height: 72px;
}

.zb-avatarbox-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zb-avatarbox-desc,
.zb-avatarbox-status {
    min-height: 18px;
    margin-top: 4px;
    color: #888;
    font-size: 12px;
}

.zb-avatarbox-action {
    width: 100%;
    margin-top: 8px;
}

.zb-avatarbox-action[disabled] {
    opacity: .55;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .zb-avatarbox-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
