.pp-role-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 12px;
}

.pp-role-card {
    display: grid;
    min-width: 0;
    gap: 3px;
    padding: 10px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.pp-role-portrait {
    aspect-ratio: 3 / 4;
    margin-bottom: 6px;
    overflow: hidden;
    background: var(--panel2);
    border-radius: 4px;
}

.pp-role-portrait img {
    height: 100%;
}

.pp-role-name,
.pp-role-actor,
.pp-role-work {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pp-role-name {
    font-size: 13px;
    font-weight: 700;
}

.pp-role-actor,
.pp-role-work {
    color: var(--muted);
    font-size: 11px;
}

.pp-role-work {
    color: #76d8d1;
}

.pp-catalog-search {
    display: flex;
    width: min(100%, 460px);
    height: 40px;
    margin: 0 0 16px;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 5px;
}

.pp-catalog-search input {
    flex: 1;
    min-width: 0;
    padding: 0 12px;
    color: var(--text);
    background: transparent;
    border: 0;
    outline: 0;
}

.pp-catalog-search button {
    min-width: 64px;
    padding: 0 13px;
    color: white;
    background: #d83f75;
    border: 0;
    cursor: pointer;
}

.pp-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 18px;
    color: var(--muted);
    font-size: 12px;
}

.pp-breadcrumb a,
.pp-role-work-link {
    color: #76d8d1;
}

.pp-role-detail-pic {
    background: var(--panel2);
}

.pp-role-detail-pic img {
    height: 100%;
}

.pp-role-description-content {
    color: #c3c7d0;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.pp-topic-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 12px;
}

.pp-topic-card {
    display: grid;
    align-content: start;
    min-width: 0;
}

.pp-topic-image {
    aspect-ratio: 16 / 9;
    margin-bottom: 4px;
    overflow: hidden;
    background: var(--panel2);
    border-radius: 6px;
}

.pp-topic-image img {
    height: 100%;
}

.pp-topic-description {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.pp-subcategory-groups {
    display: grid;
    gap: 12px;
    margin: -2px 0 18px;
}

.pp-subcategory-group {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
}

.pp-subcategory-group h3 {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.pp-subcategory-links {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    gap: 7px;
}

.pp-subcategory-links a {
    min-height: 30px;
    padding: 4px 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--panel);
    color: #c3c7d0;
    font-size: 11px;
    line-height: 20px;
}

.pp-subcategory-links a:active {
    border-color: var(--pink);
    color: var(--text);
}

@media (max-width: 760px) {
    .pp-subcategory-group { grid-template-columns: 64px minmax(0, 1fr); gap: 6px; }
    .pp-subcategory-links { gap: 6px; }
    .pp-subcategory-links a { min-height: 28px; padding: 3px 7px; font-size: 10px; }

    .pp-role-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 8px;
    }

    .pp-topic-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 13px 9px;
    }

    .pp-role-card {
        padding: 8px;
    }
}
