body.page-category {
    min-width: 0;
    background:
        radial-gradient(circle at top left, rgba(255, 146, 198, 0.18), transparent 30%),
        radial-gradient(circle at top right, rgba(149, 167, 255, 0.18), transparent 26%),
        linear-gradient(180deg, #fff8fc 0%, #f8f9ff 34%, #ffffff 100%);
    color: #2d2340;
}

.page-category a,
.page-category a:visited {
    color: inherit;
}

.category-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, 0.84);
    border-bottom: 1px solid rgba(236, 220, 241, 0.9);
}

.category-topbar-inner,
.category-main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.category-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
}

.category-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.category-brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 10px 24px rgba(248, 130, 176, 0.24);
}

.category-brand-name {
    font-size: 20px;
    font-weight: 700;
    color: #322447;
}

.category-nav {
    display: inline-flex;
    gap: 24px;
    font-size: 14px;
    color: #6a587c;
}

.category-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff8dc6 0%, #8a8cff 100%);
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 14px 32px rgba(198, 111, 185, 0.28);
}

.category-main {
    padding: 24px 0 64px;
}

.category-section {
    padding: 28px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 18px 40px rgba(183, 171, 214, 0.14);
}

.category-card-desc,
.category-card-meta,
.category-section-head span {
    color: #6b5c7d;
}

.category-section {
    margin-bottom: 20px;
    scroll-margin-top: 88px;
}

.category-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.category-section-head h2 {
    margin: 0;
    font-size: 28px;
    color: #2f2442;
}

.category-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-chip-list-compact {
    gap: 10px;
}

.category-chip {
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #f0ddee;
    color: #5d4a72 !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.category-chip.is-active {
    background: linear-gradient(135deg, #ff9fd1 0%, #95a7ff 100%);
    border-color: transparent;
    color: #fff !important;
}

.category-section-browser {
    padding: 22px 24px;
}

.category-filter-groups {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.category-filter-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding-top: 14px;
    border-top: 1px solid rgba(236, 220, 241, 0.85);
}

.category-filter-row:first-child {
    padding-top: 0;
    border-top: 0;
}

.category-filter-label {
    padding-top: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #58486d;
}

.category-filter-content {
    min-width: 0;
}

.category-chip-list.is-collapsed .category-chip-extra {
    display: none;
}

.category-expand-toggle {
    margin-top: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #a062cf;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.category-section-results {
    padding-top: 24px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 18px;
    align-items: start;
}

.category-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #fff9fd 100%);
    box-shadow: 0 16px 34px rgba(204, 188, 228, 0.18);
    min-height: 0;
    align-self: start;
}

.category-card-cover {
    width: 100%;
    aspect-ratio: 0.72;
    border-radius: 20px;
    object-fit: cover;
    background: #f5eef7;
}

.category-card-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #302444;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    max-height: calc(18px * 1.35 * 2);
}

.category-card-meta {
    font-size: 13px;
    line-height: 1.5;
}

.category-card-desc {
    font-size: 13px;
    line-height: 1.75;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    max-height: calc(13px * 1.75 * 3);
}

.category-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.category-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #f0ddee;
    color: #5d4a72 !important;
    font-size: 13px;
    font-weight: 700;
}

.category-page-link.is-active {
    background: linear-gradient(135deg, #ff9fd1 0%, #95a7ff 100%);
    border-color: transparent;
    color: #fff !important;
}

.category-page-link-nav {
    min-width: 76px;
}

.category-mobile-more {
    display: none;
    margin-top: 18px;
}

.category-mobile-more-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    background: rgba(149, 167, 255, 0.12);
    color: #4857b2 !important;
    font-size: 13px;
    font-weight: 700;
}

.category-mobile-more.is-hidden {
    display: none !important;
}

.category-empty {
    padding: 18px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px dashed #ead8ef;
    color: #7a698d;
    font-size: 14px;
    line-height: 1.7;
}

@media (max-width: 1280px) {
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    }
}

@media (max-width: 1024px) {
    .category-filter-row {
        grid-template-columns: 56px minmax(0, 1fr);
    }

    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 768px) {
    .category-nav {
        display: none;
    }

    .category-topbar-inner,
    .category-main {
        width: min(100%, calc(100% - 24px));
    }

    .category-section-browser,
    .category-section-results {
        padding: 14px 16px;
        border-radius: 20px;
    }

    .category-section-head h2 {
        font-size: 20px;
    }

    .category-section-head {
        margin-bottom: 14px;
    }

    .category-filter-row {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 10px;
        align-items: center;
        padding-top: 10px;
    }

    .category-filter-label {
        padding-top: 0;
        font-size: 12px;
        line-height: 1.2;
    }

    .category-chip-list,
    .category-chip-list-compact {
        gap: 8px;
    }

    .category-chip {
        padding: 7px 12px;
        font-size: 12px;
    }

    .category-filter-row-categories {
        order: 4;
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 10px;
        align-items: start;
    }

    .category-filter-row-categories .category-filter-content {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .category-filter-row-categories .category-filter-label {
        display: block;
        padding-top: 8px;
    }

    .category-filter-row-categories .category-chip-list {
        max-height: none;
    }

    .category-expand-toggle {
        margin-top: 2px;
        align-self: flex-start;
        font-size: 12px;
    }

    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    [data-filter-field="channel_id"] {
        order: 1;
    }

    [data-filter-field="finished"] {
        order: 2;
    }

    [data-filter-field="sort"] {
        order: 3;
    }

    .category-grid {
        margin-top: 2px;
    }

    .category-card {
        gap: 10px;
        padding: 12px;
    }

    .category-card-cover {
        aspect-ratio: 0.7;
    }

    .category-card-title {
        font-size: 16px;
        max-height: calc(16px * 1.35 * 2);
    }

    .category-card-desc {
        -webkit-line-clamp: 2;
        max-height: calc(13px * 1.75 * 2);
    }

    .category-pagination {
        display: none;
    }

    .category-mobile-more {
        display: block;
    }
}
