/* ============================================================
   作品列表 / 灵感页
   页头、瀑布流
   ============================================================ */

/* ---- 页头（与首页欢迎语同套排版） ---- */
.page-head {
    padding: 56px var(--gutter-home) 20px;
}
.page-head h1 {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.page-head p {
    margin-top: 6px;
    font-size: 17px;
    color: var(--color-text-sub);
}
/* 个人资料页：作品数量文字，和分段控制器字号一致 */
.page-head .work-count {
    font-size: 13px;
    margin-top: 10px;
    margin-left: 8px;
}

/* ============================================================
   个人资料页：主页背景图 banner
   ============================================================ */
.profile-banner {
    background-size: cover;          /* 横向拉满，纵向按比例裁切 */
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    margin: calc(-56px - var(--nav-height)) calc(-1 * var(--gutter-home)) 0;  /* 往上延伸到导航栏底下 */
    padding: calc(56px + var(--nav-height)) var(--gutter-home) 48px;            /* 内容仍在导航栏下方 56px 处 */
}
/* 半透明遮罩：让背景图上的文字可读 */
.profile-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.15));
    pointer-events: none;
}
/* 内容层浮在遮罩上面 */
.profile-banner > * {
    position: relative;
    z-index: 1;
}
/* 背景图上的文字改成白色 */
.profile-banner h1 {
    color: #fff;
}
.profile-banner .page-head-username {
    color: rgba(255, 255, 255, 0.85);
}
/* 个人简介：显示在名字/@用户名下方，白色小字半透明 */
.profile-banner .page-head-bio {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    line-height: 1.5;
    margin-top: 6px;
    max-width: 480px;
}

/* 个人页页头：用户名 + 编辑按钮 左右分布 */
.page-head-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* 编辑资料按钮：毛玻璃效果，视觉参数和胶囊导航栏一致 */
.btn-edit-profile {
    flex-shrink: 0;
    padding: 4px 20px;
    background: rgba(251, 251, 253, 0.2);
    color: #fff;
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    backdrop-filter: saturate(180%) blur(15px);
    border: 0.2px solid rgba(255, 255, 255, 0.15);
    border-radius: 980px;
    box-shadow:
        inset 0 0.5px 0.5px rgba(255, 255, 255, 0.2),
        inset 0 -1px 1px rgba(0, 0, 0, 0.1),
        0 4px 10px rgba(0, 0, 0, 0.2);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;            /* 与退出登录按钮一致，避免 a 继承全局行高而偏高 */
    white-space: nowrap;
    transition: background 0.2s ease;
}
.btn-edit-profile:hover {
    background: rgba(251, 251, 253, 0.45);
}

/* 个人页右侧操作区：编辑资料 + 退出登录 垂直排列、左对齐 */
.profile-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}
.profile-actions form {
    margin: 0;
}
/* 退出登录按钮：非常细的白色描边 */
.btn-logout-text {
    background: rgba(255, 255, 255, 0.1);
    border: 0.2px solid rgba(255, 255, 255, 0.3);
    padding: 4px 20px;
    border-radius: 980px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.2;            /* 与编辑资料按钮一致 */
    font-family: inherit;      /* button 默认不继承字体，补上与 a 对齐 */
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.btn-logout-text:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* 个人页页头：头像 + 用户名 横向排列 */
.page-head-user {
    display: flex;
    align-items: center;
    gap: 30px;
}
/* 个人页：昵称 + 用户名 垂直排列
   间距统一由 .page-head-name 的 flex gap 控制 */
.page-head-name {
    display: flex;
    flex-direction: column;
    gap: 1px;   /* 昵称与用户名的间距（原 2px 的一半） */
}
/* 用户名规则特异性需高于 .page-head p 的 margin-top，避免 6px 干扰 */
.page-head .page-head-username {
    font-size: 14px;
    font-weight: 400;
    margin: 0;
}
/* 个人主页头像：这里只管尺寸，
   玻璃效果（磨砂包边、玻璃罩）由 components/avatar.css 统一提供 */
.page-head-avatar {
    width: 150px;
    height: 150px;
}

/* ---- 瀑布流 ---- */
/* CSS columns 实现：浏览器自动把卡片填进多列，图片保持原始比例 */
.waterfall {
    display: grid;
    grid-template-columns: repeat(3, 1fr);  /* 满屏一行三张 */
    gap: 20px;
    padding: 23px var(--gutter-home) 40px;
}

.wf-card {
    display: block;
    position: relative;         /* 让 ::after 玻璃描边层相对它定位 */
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--card-shadow);   /* 全站统一：引用 base.css 的苹果同款阴影变量 */
    transition: transform 0.3s cubic-bezier(0, 0, .5, 1), box-shadow 0.3s cubic-bezier(0, 0, .5, 1);   /* 苹果同款缓动 */
}
/* 描边和内阴影层：盖在海报图上面才能被看见。
   inset 阴影画在"背景之上、内容之下"，直接写在卡片上会被铺满的图片盖住 */
.wf-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 18px;        /* 和卡片圆角一致，不然四角会透出直角 */
    box-shadow:
        inset 0 0 0 2px rgba(255, 255, 255, 0.05),   /* 模拟描边 */
        inset 0 1px 1px rgba(255, 255, 255, 0.4),   /* 顶部内高光 */
        inset 0 -1px 1px rgba(0, 0, 0, 0.4);       /* 底部内暗边 */
    pointer-events: none;       /* 不拦截点击，点击落回卡片链接 */
}
.wf-card:hover {
    transform: scale3d(1.01, 1.01, 1.01);   /* 全站统一轻微放大（原 1.02，收敛到帮手卡的 1.01） */
    box-shadow: var(--card-shadow-hover);   /* 全站统一：引用悬停阴影变量 */
}

/* 列表页海报统一 4:3 比例裁切，保证所有卡片一样大 */
.wf-poster {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}
.wf-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);        /* 出血：图比裁切框略大，缝隙被图盖住 */
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 900px) {
    .waterfall { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .waterfall { grid-template-columns: 1fr; }

    /* 手机端：昵称与用户名缩放到 0.7 倍 */
    .page-head-name h1 {
        font-size: calc(40px * 0.7);
    }
    .page-head .page-head-username {
        font-size: calc(14px * 0.7);
    }

    /* 手机端：按钮换到用户名下面 */
    .page-head-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    /* 编辑资料与退出登录两个按钮同步缩进与字体，保证大小一致
       （button 默认不继承字体，补 font-family 与 a 对齐） */
    .btn-edit-profile,
    .btn-logout-text {
        padding: 6px 16px;
        font-size: 13px;
        font-family: inherit;
        line-height: 1.2;          /* 两按钮行高统一，高度一致 */
    }

    /* 手机端：头像保持大头像比例，玻璃参数用默认档（100px 不算小尺寸） */
    .page-head-user {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    .page-head-avatar {
        width: 100px;
        height: 100px;
    }
}

/* ============================================================
   搜索结果页：居中大搜索框
   ============================================================ */
.search-hero {
    background-image: url("../../images/head_photo.5f89cf611bff.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    margin-top: calc(-1 * var(--nav-height));  /* 往上延伸到导航栏底下 */
    padding-top: var(--nav-height);              /* 内容在导航栏下方 */
    padding-bottom: 24px;
    min-height: 302px;                            /* 和首页背景图高度一致 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
}
/* 半透明遮罩：让搜索框和文字可读 */
.search-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.15));
    pointer-events: none;
}
.search-hero .nav-search,
.search-hero .search-result-info {
    position: relative;
    z-index: 1;
}
.search-result-info {
    font-size: 14px;
    color: #fff;
    margin: 0;
}
.search-hero .nav-search {
    width: 100%;
    max-width: 560px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.search-hero .nav-search:focus-within {
    width: 100%;
    max-width: 560px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}
.search-hero .nav-search-input {
    font-size: 15px;
}

/* ============================================================
   分段控制器滑动指示器
   ============================================================ */
.segment {
    position: relative;
}
.segment-indicator {
    position: absolute;
    top: 2px;
    left: 0;
    height: calc(100% - 4px);
    background: #fff;
    border-radius: 7px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 0;
}
.segment a {
    position: relative;
    z-index: 1;
}
/* 去掉 active 的白色背景，改用指示器滑动 */
.segment a.active {
    background: transparent;
    box-shadow: none;
}

/* ============================================================
   作品页顶部背景图（和首页尺寸一致）
   ============================================================ */
.work-banner {
    background-image: url("../../images/portfolio_head_photo.5f89cf611bff.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    margin-top: calc(-1 * var(--nav-height));  /* 往上延伸到导航栏底下 */
    padding-top: var(--nav-height);              /* 内容在导航栏下方 */
    min-height: 302px;                            /* 和首页背景图高度一致 */
    display: flex;
    flex-direction: column;
    justify-content: center;
}
/* 半透明遮罩：让文字可读 */
.work-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.15));
    pointer-events: none;
}
.work-banner h1,
.work-banner p {
    position: relative;
    z-index: 1;
    color: #fff;
}

/* ============================================================
   搜索结果页：用户搜索结果
   ============================================================ */
.search-users {
    padding: 0 var(--gutter-home) 24px;
}
.search-section-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-text-sub);
    margin: 26px 0 14px;
}
.search-user-list {
    display: flex;
    flex-wrap: wrap;
    gap: 22px 20px;
}
.search-user-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 50px 15px 15px;
    background: rgba(255, 255, 255, 0.6);
    border: 0.2px solid rgba(255, 255, 255, 0.4);
    border-radius: 980px;
    backdrop-filter: blur(12px);
    text-decoration: none;
    box-shadow: var(--card-shadow);  /* 静止状态淡阴影（全站统一） */
    transform-origin: center center;  /* 明确缩放原点：中心 */
    will-change: transform;           /* 提示浏览器优化渲染层，避免毛玻璃+缩放时的位移 */
    transition: transform 0.3s cubic-bezier(0, 0, .5, 1), box-shadow 0.3s cubic-bezier(0, 0, .5, 1);   /* 苹果同款缓动 */
}
.search-user-card:hover {
    transform: scale3d(1.01, 1.01, 1.01);  /* 全站统一轻微放大（原 1.02） */
    box-shadow: var(--card-shadow-hover);  /* 全站统一：引用悬停阴影变量 */
}
/* 搜索结果页头像：这里只管尺寸，
   玻璃效果（磨砂包边、玻璃罩）由 components/avatar.css 统一提供 */
.search-user-avatar {
    width: 120px;
    height: 120px;
    margin-left: 2px;
}
.search-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.search-user-name {
    font-size: 35px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}
.search-user-username {
    font-size: 20px;
    color: var(--color-text-sub);
    margin: 0;
}

/* ============================================================
   删除确认弹窗（个人主页）
   ============================================================ */
.modal-mask {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.modal-mask.open {
    display: flex;
}
.modal-box {
    width: 100%;
    max-width: 380px;
    background: rgba(251, 251, 253, 0.96);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 18px;
    padding: 28px 28px 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.modal-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--color-text);
}
.modal-work-name {
    color: var(--color-accent);
}
.modal-desc {
    margin-top: 8px;
    font-size: 14px;
    color: var(--color-text-sub);
}
#deleteForm input[type="password"] {
    width: 100%;
    margin-top: 18px;
    padding: 10px 14px;
    border: 0.5px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    outline: none;
}
#deleteForm input[type="password"]:focus {
    border-color: var(--color-accent);
}
.modal-error {
    margin-top: 10px;
    font-size: 13px;
    color: #d70015;
}
.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}
.btn-cancel {
    flex: 1;
    padding: 10px 0;
    border-radius: 980px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: transparent;
    color: var(--color-text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.btn-cancel:hover {
    background: rgba(0, 0, 0, 0.04);
}
/* 单个"知道了"按钮：不占满整行，自然宽度居中 */
.modal-actions .btn-ok-single {
    flex: 0 1 auto;
    padding: 10px 32px;
    margin: 0 auto;
}
/* 手机端屏蔽提示弹窗：标题文字居中 */
#mobileStudioModal .modal-title {
    text-align: center;
}
.btn-confirm-del {
    flex: 1;
    padding: 10px 0;
    border-radius: 980px;
    border: none;
    background: #d70015;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.btn-confirm-del:hover {
    background: #c4001a;
}
.btn-confirm-del:disabled {
    opacity: 0.6;
    cursor: default;
}


/* ============================================================
   个人主页宽度阶梯（2026-10-16 对齐 Apple 支持页 support.apple.com）
   ------------------------------------------------------------
   Apple 原值三档：>1068px 内容定宽 980px；735~1068px 定宽 692px；
   ≤734px 内容 87.5%（两侧各 6.25%）。大屏永不超宽，只多留白。
   Apple 在元素上写 width:980px + margin:auto；本页这些区块原本靠
   padding: var(--gutter-home) 通铺定位，改动最小且逐像素等价的做法
   是把左右 padding 换成 (100% − 档位宽) / 2——padding 百分比取自
   父级内容宽（不含滚动条），与 Apple 的 margin:auto 完全同值。
   断点 1068 / 734 与 Apple 完全一致；banner 背景保持全宽出血。
   仅 body.page-profile 生效，共用本文件的其他页面不受影响。
   ============================================================ */

/* page-head 通铺侧 padding 清零：banner 的负 margin 出血随之改为自然满宽 */
body.page-profile .page-head { padding-left: 0; padding-right: 0; }

/* banner：背景全宽出血，文字行（头像/名字/编辑按钮）钳进内容档 */
body.page-profile .profile-banner {
    margin-left: 0;                            /* 父级已无侧 padding，不再需要负 margin 出血 */
    margin-right: 0;
    padding-left: calc((100% - 980px) / 2);    /* 桌面档：内容 980 居中 */
    padding-right: calc((100% - 980px) / 2);
}

/* 瀑布流（访客视角）：与 banner 同一条 980 中轴 */
body.page-profile .waterfall {
    padding-left: calc((100% - 980px) / 2);
    padding-right: calc((100% - 980px) / 2);
}

/* 平板档（≤1068px）：内容收到 692px；瀑布流 2 列（Apple 断点同步，
   692 / 2 = 336px 每卡，与全局 900px 断点的 2 列规则自然衔接） */
@media (max-width: 1068px) {
    body.page-profile .profile-banner,
    body.page-profile .waterfall {
        padding-left: calc((100% - 692px) / 2);
        padding-right: calc((100% - 692px) / 2);
    }
    body.page-profile .waterfall { grid-template-columns: repeat(2, 1fr); }
}

/* 手机档（≤734px）：内容 87.5%（Apple page-title 同值）；瀑布流 1 列 */
@media (max-width: 734px) {
    body.page-profile .profile-banner,
    body.page-profile .waterfall {
        padding-left: 6.25%;
        padding-right: 6.25%;
    }
    body.page-profile .waterfall { grid-template-columns: 1fr; }
}

/* ============================================================
   个人主页分段器：胶囊 tab（本人 / 访客两视角共用 · 2026-10-16）
   ------------------------------------------------------------
   2026-10-16 用户反馈：访客看他人主页时分段器还是旧 iOS 灰轨道样式，
   与本人视角的胶囊 tab 不一致。根因：胶囊规格（对齐后台 .ad-tabs）原本
   写在 profile-manage.css 里，而访客页不加载那份 CSS。现整段上移到本
   文件，按 body 类圈定作用域——
     本人视角 body.page-profile ／ 访客视角 body.page-profile-guest；
   灵感页/上传页的 .segment 不带这两类，保持全局 iOS 样式原样不动。
   视觉规格逐项对齐后台 admin.css .ad-tabs：轨道 #e9e9eb 全圆
   （--ad-fill-2 同值）、tab 30px 高 / 14px 边距 / 12.5px 字号、未选中
   深灰 #5b5b60（--ad-gray-ink 同值）且无 hover 变色、选中白块加粗带
   0 1px 2px 8% 阴影——后台无滑动指示器，选中态直接上白底
   （segment-indicator 因此隐藏；本页 JS 照常计算滑块位置，无副作用）。
   ============================================================ */
.page-profile .segment,
.page-profile-guest .segment {
    padding: 3px;                  /* 后台轨道壁 3px（全局 iOS 版为 2px） */
    background: #e9e9eb;           /* 后台 --ad-fill-2 同值 */
    border-radius: 980px;          /* 全圆胶囊轨道（全局 iOS 版为 9px） */
    align-items: center;
    height: 36px;                  /* 与本人视角工具条胶囊同高 */
}
.page-profile .segment a,
.page-profile-guest .segment a {
    display: inline-flex;          /* 钉块化：高度/对齐不再依赖行内盒行高 */
    align-items: center;
    height: 30px;                  /* 填满轨道内壁：36 − 上下壁 3×2 = 30 */
    padding: 0 14px;               /* 垂直居中交给 flex；左右 14px = 后台同值 */
    font-size: 12.5px;             /* 后台同值（全局 iOS 版 13px） */
    font-weight: 400;              /* 未选中常规字重 */
    line-height: 1;
    color: #5b5b60;                /* 后台 --ad-gray-ink 同值 */
    border-radius: 980px;          /* 全圆 tab（全局 iOS 版 7px） */
    transition: background 0.2s ease, color 0.2s ease;
}
.page-profile .segment a:not(.active):hover,
.page-profile-guest .segment a:not(.active):hover { background: transparent; }   /* 后台无 hover 变色 */
.page-profile .segment a.active,
.page-profile-guest .segment a.active {
    background: #fff;              /* 选中白块（后台 .ad-tab.active 同款）；
                                      压过本文件上方 .segment a.active 的
                                      transparent + 滑块方案（特异性更高） */
    color: #232323;                /* 后台 --ad-text-1 同值 */
    font-weight: 500;              /* 选中加粗 */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);   /* 后台同值 */
}
.page-profile .segment-indicator,
.page-profile-guest .segment-indicator { display: none; }   /* 胶囊方案无滑动白块 */

/* ============================================================
   作品卡片：点赞数（2026-10-19）
   ------------------------------------------------------------
   只读展示、不可点击：卡片整面被 .wf-stretch 透明链接覆盖，卡片内再放
   可点元素要额外做 z-index 提升 + 冒泡拦截，是这套卡片结构最易出错的地方。
   点赞入口统一在详情页（右下角悬浮按钮），这里只负责显示数字。

   位置与对齐：卡片信息栏 .card-meta 是 flex，作者区用 margin-left:auto
   把自己推到最右。赞数要贴在作者区左侧，就不能再给它自己加 auto（两个
   auto 会平分剩余空间，赞数会跑到中间）——改成"auto 归赞数、相邻作者区
   关掉 auto"，两者紧贴成右侧一组。选择器用相邻兄弟限定，首页卡片没有
   这个元素，行为完全不变（零回归）。
   ============================================================ */
.card-like {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: none;                 /* 不参与压缩：数字被挤掉就没有信息了 */
    margin-left: auto;          /* 吃掉剩余空间，把赞数+作者一起推到右侧 */
    color: rgba(255, 255, 255, 0.86);   /* 与 .card-author-name 同色系（深色玻璃底） */
    font-size: calc(12px * var(--card-fs-sub, 1));   /* 跟随卡片小字档缩放 */
    font-weight: 600;
    /* 等宽数字：9→10、99→100 时宽度不变，卡片信息栏不会因此抖动 */
    font-variant-numeric: tabular-nums;
    /* 压在任意封面图上都要可读（封面可能是纯白） */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

/* 关键一行：auto 已经被赞数吃掉，作者区不能再抢（详见上方注释） */
.card-like + .card-author {
    margin-left: 0;
}

.card-like-icon {
    width: 13px;
    height: 13px;
    flex: none;
    fill: currentColor;         /* 实心心形：列表里的数字是"结果"，不是"待你点击" */
}

/* ---------- 分页页码条（2026-10-19，S2.5「我的喜欢」/ S3 排序 tab 共用） ----------
   只新增类，不动上面任何既有规则：本文件同时被灵感页引用。 */
.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 var(--gutter-home) 64px;   /* .waterfall 自带 40px 底距，这里只补页尾留白 */
}

.pager-step,
.pager-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    color: var(--color-text);
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease;
}

a.pager-num { padding: 0; }               /* 纯数字格子只要 36px 见方 */
a.pager-step:hover,
a.pager-num:hover { background: rgba(0, 0, 0, .06); }

/* 当前页：实心强调色，和苹果风的可点击态区分开 */
.pager-num.is-current {
    background: var(--color-accent);
    color: #fff;
    font-weight: 600;
}

/* 到头了：灰掉但保留位置，避免"上一页"整块消失导致页码条左右跳动 */
.pager-step.is-disabled {
    color: rgba(29, 29, 31, .28);
    cursor: default;
}

.pager-gap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 36px;
    color: var(--color-text-sub);
    user-select: none;
}

@media (max-width: 640px) {
    .pager { gap: 2px; padding-bottom: 40px; }
    .pager-step,
    .pager-num { min-width: 32px; height: 32px; padding: 0 8px; font-size: 13px; }
}

/* ---------- 排序工具栏（2026-10-19，S3 排序 tab） ----------
   胶囊分段控件：轨道浅灰、当前项白色浮起（与导航 pill 同一套视觉语言）。
   同样只新增类，不动既有规则。 */
.works-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 4px var(--gutter-home) 0;
}

.sort-tabs {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .05);
}

.sort-tab {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 15px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    color: var(--color-text-sub);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.sort-tab:hover { color: var(--color-text); }

/* 当前项：白底浮起 + 细阴影。不可点（模板里渲染成 span），所以不写 hover */
.sort-tab.is-active {
    background: #fff;
    color: var(--color-text);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

@media (max-width: 640px) {
    .sort-tab { height: 28px; padding: 0 12px; font-size: 13px; }
}

/* ---------- 精选角标（2026-10-19，S4） ----------
   圆底：半透明毛玻璃（只让"底"透，星标本体保持不透明实色）。
   pointer-events:none：角标不可点，点击直接穿透到 .wf-stretch 整卡链接——
   这是这套卡片结构的铁律，任何新增覆盖物都不能抢走整卡的点击。
   层叠：海报层 z-index 为 auto（低于 .wf-stretch 的 2），所以即使不加 z-index
   也不会盖住链接；视觉上因为链接是透明矩形，角标照样清晰可见。 */
.wf-featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    /* 毛玻璃本体：半透明白 + 背景模糊 + 一点点提亮，让底下的封面"透"出来但不刺眼 */
    background: rgba(255, 255, 255, .26);
    backdrop-filter: blur(12px) saturate(140%) brightness(1.06);
    -webkit-backdrop-filter: blur(12px) saturate(140%) brightness(1.06);
    border: 1px solid rgba(255, 255, 255, .5);    /* 浅色封面上靠这圈边勾出轮廓 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, .26);    /* 深色封面上靠阴影拉开层次 */
    pointer-events: none;
}

.wf-featured-badge svg {
    width: 21px;
    height: 21px;
    fill: #ffc107;                                /* 不透明黄：不受圆底 alpha 影响 */
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .28));   /* 白底封面也立得住 */
}

@media (max-width: 640px) {
    .wf-featured-badge { top: 10px; right: 10px; width: 30px; height: 30px; }
    .wf-featured-badge svg { width: 18px; height: 18px; }
}
