/* ===== 首页推荐位（自助上推荐位） =====
   推荐位是付费位：已上推荐位的站点占前几格，后面只保留 1 个虚线「点我上推荐」，
   不再把空位全部铺满。卡片比普通分类标签稍大一点，体现推荐位的视觉重量。
   6 色淡底轮换，和下面白底的分类卡片区分开，一眼看得出是广告位。 */
.panel--featured { padding-bottom: 14px; }
.panel--featured .sec-head { margin-bottom: 11px; }
.feat-hint {
    font-size: 12px;
    color: var(--muted2);
}
.feat-grid {
    /* 列数跟着实际卡片数走（PHP 输出 --feat-cols，最多 6）：
       只留 1 颗「点我上推荐」后，如果还按固定 6 列排，右侧会空出一大片。 */
    display: grid;
    grid-template-columns: repeat(var(--feat-cols, 6), minmax(0, 1fr));
    gap: 10px;
}
.feat-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    min-height: 54px;
    padding: 12px 14px;
    border-radius: 11px;
    border: 1px solid transparent;
    font-size: 13px;
    color: var(--text);
    transition: transform .15s, box-shadow .15s, border-color .15s, color .15s;
}
/* 推荐位角标：右上角金色「推荐」小徽章，已上推荐位的站点才有 */
.feat-crown {
    position: absolute;
    top: -7px;
    right: -6px;
    height: 18px;
    min-width: 34px;
    padding: 0 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffe084, #f5a623);
    color: #8a4b00;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 2px 7px rgba(245, 158, 11, .45), 0 0 0 2px #fff;
    transform: rotate(-6deg);
    z-index: 3;
    pointer-events: none;
}
.feat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(20, 40, 80, .1);
}
.feat-ico {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 7px;
    object-fit: contain;
    background: rgba(255, 255, 255, .7);
}
.feat-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.feat-card.f1 { background: #e8f4ff; }
.feat-card.f2 { background: #fff7e6; }
.feat-card.f3 { background: #f0fff4; }
.feat-card.f4 { background: #f9f0ff; }
.feat-card.f5 { background: #fff0f6; }
.feat-card.f6 { background: #e6fffb; }

/* 空位：虚线圈 + 淡灰，hover 才变主色，不抢已上架站点的视觉重量 */
.feat-empty {
    justify-content: center;
    gap: 6px;
    background: transparent;
    border: 1px dashed var(--border);
    color: var(--muted2);
}
.feat-empty:hover {
    border-color: var(--primary-2);
    color: var(--primary-2);
    box-shadow: none;
    transform: none;
}
.feat-plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 7px;
    background: var(--chip-bg);
    font-size: 16px;
    line-height: 1;
}
.feat-empty .feat-name { flex: 0 0 auto; }

html[data-theme="dark"] .feat-ico { background: rgba(255, 255, 255, .08); }
html[data-theme="dark"] .feat-crown { box-shadow: 0 2px 7px rgba(245, 158, 11, .3), 0 0 0 2px var(--card); }
html[data-theme="dark"] .feat-card.f1 { background: rgba(59, 130, 246, .14); }
html[data-theme="dark"] .feat-card.f2 { background: rgba(245, 158, 11, .12); }
html[data-theme="dark"] .feat-card.f3 { background: rgba(34, 197, 94, .12); }
html[data-theme="dark"] .feat-card.f4 { background: rgba(168, 85, 247, .14); }
html[data-theme="dark"] .feat-card.f5 { background: rgba(236, 72, 153, .12); }
html[data-theme="dark"] .feat-card.f6 { background: rgba(20, 184, 166, .12); }
html[data-theme="dark"] .feat-empty { background: transparent; }

.cat-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: linear-gradient(120deg, #3b82f6, #6366f1);
    color: #fff;
    padding: 22px 24px;
}
.cat-hero .ch-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 56px;
}
.cat-hero .ch-icon i { font-size: 28px; }
.cat-hero > div { position: relative; z-index: 2; }
.cat-hero .ch-icon { position: relative; z-index: 2; }
/* 分类名前两位的淡色残影：右侧大字，纯装饰 */
.ch-watermark {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 88px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, .16);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    z-index: 1;
}
.cat-hero h1 { font-size: 24px; font-weight: 800; line-height: 1.3; }
.cat-hero .ch-sub { margin-top: 4px; font-size: 12px; opacity: .86; }
.cat-hero .ch-count {
    display: inline-block;
    margin-top: 6px;
    font-size: 11px;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
}
.cat-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 4px;
}
.cat-filters a {
    font-size: 12px;
    padding: 6px 13px;
    border-radius: 999px;
    background: var(--chip-bg);
    color: var(--chip-text);
    transition: all .15s;
}
.cat-filters a:hover { color: var(--primary); }
.cat-filters a.on { background: var(--primary); color: #fff; }

@media (max-width: 820px) {
    .feat-hint { display: none; }
    .ch-watermark { font-size: 56px; right: 12px; }
    .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .feat-card { padding: 10px 11px; gap: 8px; font-size: 12.5px; }
    .feat-ico, .feat-plus { width: 24px; height: 24px; flex-basis: 24px; }
    .feat-plus { font-size: 15px; }
}
