.pagination {
    align-self: stretch;
    width: 100%;
    overflow: hidden;
    justify-content: center;
    align-items: center;
    gap: 8px;
    display: flex;
}

.pagination-btn {
    width: 36px;
    min-width: 36px;
    height: 32px;
    padding: 0;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
    border-radius: 16px;
    justify-content: center;
    align-items: center;
    display: flex;
    border: none;
    cursor: pointer;
    color: #A3A3A3;
    font-size: 12px;
    font-family: PingFang SC, sans-serif;
    font-weight: 400;
    line-height: 18px;
    text-decoration: none;
    box-sizing: border-box;
    flex-shrink: 0;
}

a.pagination-btn:hover {
    color: #F5F5F5;
}

.pagination-btn.is-disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

.pagination-btn--wide {
    width: 42px;
    min-width: 42px;
}

.pagination-btn--active {
    background: #EC237F;
    color: #181818;
}

.pagination-btn--arrow {
    width: 36px;
    min-width: 36px;
    padding: 0;
}

.pagination-arrow {
    width: 18px;
    height: 18px;
    display: block;
}

.pagination-ellipsis {
    color: #A3A3A3;
    font-size: 12px;
    font-family: PingFang SC, sans-serif;
    font-weight: 400;
    line-height: 18px;
    word-wrap: break-word;
    flex-shrink: 0;
}

.pagination-jump {
    overflow: hidden;
    justify-content: center;
    align-items: center;
    gap: 8px;
    display: flex;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    flex-shrink: 0;
}

.pagination-jump-label {
    color: #A3A3A3;
    font-size: 12px;
    font-family: "Noto Sans SC", "PingFang SC", sans-serif;
    font-weight: 400;
    line-height: 18px;
    word-wrap: break-word;
    flex-shrink: 0;
}

.pagination-jump-input {
    width: 48px;
    height: 32px;
    padding: 0;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
    border: none;
    border-radius: 16px;
    border: none;
    color: #A3A3A3;
    font-size: 12px;
    font-family: "Noto Sans SC", "PingFang SC", sans-serif;
    font-weight: 400;
    line-height: 18px;
    text-align: center;
    box-sizing: border-box;
}

.pagination-jump-input::-webkit-outer-spin-button,
.pagination-jump-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pagination-jump-input:focus,
.pagination-jump-input:focus-visible {
    color: #F5F5F5;
    outline: none;
    outline-color: transparent;
    box-shadow: none;
}

.pagination-jump-submit {
    width: 60px;
    height: 32px;
    padding: 0;
    background: #EC237F;
    overflow: hidden;
    border: none;
    border-radius: 16px;
    color: #181818;
    font-size: 12px;
    font-family: "Noto Sans SC", "PingFang SC", sans-serif;
    font-weight: 400;
    line-height: 18px;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    display: flex;
    box-sizing: border-box;
}

.pagination-jump-submit:hover {
    background: #ffe56a;
}

/* H5 Figma: 343 宽条、space-between、30 圆钮 / 箭头 pill（对齐 huangguo.me 「‹ 1 2 … 22 ›」）。
   页面样式（rank/list/more/themeIndex/search…）对 .xxx-hero .pagination-btn 写了 PC 尺寸（48px 圆钮、vw 缩放）。
   整页加载时它们排在本文件之前，同权重由本文件胜出；但站内切页（客户端路由）时页面样式表后插入到 <head> 末尾，
   同权重反而由 PC 尺寸胜出，手机就出现 48px 大圆钮或几像素的小点。这里用 body[class] 前缀把 H5 规则的权重
   提到 (0,2,1)，与样式表先后无关，所有使用 CommonPagination 的页面统一成同一套 H5 分页。 */
@media (max-width: 767px) {
    body[class] .pagination {
        width: 100%;
        max-width: 343px;
        margin-left: auto;
        margin-right: auto;
        padding: 0;
        overflow: hidden;
        justify-content: space-between;
        align-items: center;
        gap: 0;
        flex-wrap: nowrap;
        display: flex;
        align-self: center;
    }

    body[class] .pagination-btn,
    body[class] .pagination-btn--wide {
        width: 30px;
        min-width: 30px;
        height: 30px;
        padding: 0 4px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 999px;
        color: rgba(255, 255, 255, 0.55);
        font-size: 14px;
        line-height: 20px;
    }

    body[class] .pagination-btn--active {
        background: #ec237f;
        color: #fff;
    }

    body[class] .pagination-btn--arrow {
        width: auto;
        min-width: 0;
        height: 30px;
        padding: 6px 7px;
        gap: 10px;
    }

    body[class] .pagination-arrow {
        width: 16px;
        height: 16px;
    }

    body[class] .pagination-ellipsis {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        width: auto;
        min-width: 20px;
        height: 30px;
        padding: 0 4px;
        border-radius: 999px;
        color: rgba(255, 255, 255, 0.55);
        font-size: 14px;
        line-height: 20px;
        background: transparent;
        box-sizing: border-box;
        text-align: center;
    }

    body[class] .pagination-jump {
        display: none;
    }
}
