/* 筛选条 + 下拉面板 —— 按用户最新截图 1:1 */

/* ===== 通栏筛选条（紧贴顶栏下方） ===== */
.filter-strip {
    background: linear-gradient(180deg, #1d1d1d, #161616);
    border-bottom: 1px solid #101010;
    box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
/* 通栏满宽（在 .site-main 内时抵消左右留白；顶部绝不用负 margin，避免被 sticky 顶栏遮盖） */
.site-main > .filter-strip:first-child {
    margin: 0 calc(-1 * var(--page-pad-x)) 0;
}
.filter-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 7px 20px;
}
.filter-spacer { flex: 1 1 auto; }

/* 按钮 */
.strip-btn {
    height: 30px;
    padding: 0 13px;
    background: linear-gradient(180deg, #3c3c3c, #333);
    border: 1px solid #262626;
    border-radius: 3px;
    color: #ddd;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 1px 2px rgba(0,0,0,.35);
    transition: background .12s;
}
.strip-btn:hover { background: linear-gradient(180deg, #474747, #3d3d3d); color: #fff; }
.wh-joined { display: inline-flex; }
.wh-joined .strip-btn {
    border-right-width: 0;
    border-radius: 0;
    box-shadow: none;
}
.wh-joined .strip-btn:first-child { border-radius: 3px 0 0 3px; }
.wh-joined .strip-btn:last-child { border-right-width: 1px; border-radius: 0 3px 3px 0; }
.cat-btn.is-on { background: linear-gradient(180deg, #555, #464646); color: #fff; }
.purity-sfw.is-on {
    background: linear-gradient(180deg, #55803a, #43682c);
    border-color: #2e4a1d;
    color: #fff;
    text-shadow: 0 1px 1px rgba(0,0,0,.3);
}
.purity-sketchy { color: #999; }
.purity-sketchy.is-on {
    background: linear-gradient(180deg, #6b5a3d, #55462e);
    border-color: #3d3220;
    color: #fff;
}
.dd-btn .dd-caret { font-size: 10px; color: #999; margin-left: 2px; }
.dd-btn[aria-expanded="true"] {
    background: linear-gradient(180deg, #4d4d4d, #404040);
    color: #fff;
}
.icon-only {
    width: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.icon-only svg { fill: currentColor; }
.refresh-btn {
    background: linear-gradient(180deg, #3d8b45, #2f6d35);
    border-color: #1f4a23;
    color: #fff;
}
.refresh-btn:hover { background: linear-gradient(180deg, #47994f, #387a3e); color: #fff; }

/* ===== 下拉面板通用 ===== */
.wh-dd { position: relative; }
.dd-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    padding: 10px;
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    box-shadow: 0 12px 32px rgba(0,0,0,.7);
    z-index: 1050;
}
.dd-panel[hidden] { display: none; }

/* ===== 分辨率面板（tab + 屏幕行 + 5 列表格 + 自定义行） ===== */
.dd-res { width: 480px; }
.dd-tabs { display: flex; gap: 4px; }
.dd-tab {
    flex: 1;
    height: 30px;
    background: linear-gradient(180deg, #2e2e2e, #262626);
    border: 1px solid #3a3a3a;
    border-radius: 3px;
    color: #999;
    font-size: 13px;
    cursor: pointer;
}
.dd-tab.is-on {
    background: linear-gradient(180deg, #4d4d4d, #404040);
    color: #fff;
    border-color: #555;
}
.dd-screen-line {
    text-align: center;
    color: #999;
    font-size: 12px;
    margin: 8px 0;
}
.dd-screen-line b { color: #ddd; font-style: italic; }
.dd-res-table { width: 100%; border-collapse: collapse; }
.dd-res-table th {
    color: #888;
    font-size: 12px;
    font-weight: 400;
    text-align: center;
    padding: 3px 0 5px;
}
.dd-res-table td { padding: 2px; }
.dd-cell {
    width: 100%;
    height: 26px;
    padding: 0 6px;
    background: linear-gradient(180deg, #2e2e2e, #262626);
    border: 1px solid #3a3a3a;
    border-radius: 3px;
    color: #bbb;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}
.dd-cell:hover { background: #383838; color: #fff; }
.dd-cell.is-on { background: #3d5c7d; border-color: #4d74a0; color: #fff; }
.dd-cell.is-screen { font-style: italic; font-weight: 700; }
.dd-custom-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #2e2e2e;
}
.dd-custom-label {
    flex: 1;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #2e2e2e, #262626);
    border: 1px solid #3a3a3a;
    border-radius: 3px;
    color: #999;
    font-size: 12px;
}
.dd-custom-input {
    width: 76px;
    height: 30px;
    padding: 0 8px;
    background: #141414;
    border: 1px solid #3a3a3a;
    border-radius: 3px;
    color: #ccc;
    font-size: 12px;
    outline: none;
    text-align: center;
}
.dd-custom-input:focus { border-color: #4aa3df; }
.dd-custom-x { color: #888; }

/* ===== 比例面板（4 列表格 + 全宽/所有肖像） ===== */
.dd-ratio { width: 300px; }
.dd-ratio-table { width: 100%; border-collapse: collapse; }
.dd-ratio-table th {
    color: #888;
    font-size: 12px;
    font-weight: 400;
    text-align: center;
    padding: 2px 0 6px;
}
.dd-ratio-table td { padding: 2px; }
.dd-cell-wide { color: #ddd; background: linear-gradient(180deg, #383838, #2e2e2e); }

/* ===== 颜色面板（6 列色块 + 无色斜线） ===== */
.dd-color { min-width: 0; }
.swatch-grid {
    display: grid;
    grid-template-columns: repeat(6, 46px);
    gap: 5px;
}
.swatch {
    width: 46px;
    height: 26px;
    border: 1px solid rgba(0,0,0,.5);
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
}
.swatch:hover { border-color: #888; }
.swatch.is-on {
    outline: 2px solid #4aa3df;
    outline-offset: 1px;
}
.swatch-none {
    background:
        linear-gradient(45deg, transparent 46%, #d63031 46%, #d63031 54%, transparent 54%),
        #e8e8e8;
}

/* ===== 排序 / 时间范围面板（窄垂直列表） ===== */
.dd-sort, .dd-range { min-width: 104px; padding: 6px 0; }
.sort-list { display: flex; flex-direction: column; gap: 1px; }
.sort-item {
    padding: 7px 12px;
    background: linear-gradient(180deg, #2e2e2e, #262626);
    border: 1px solid #262626;
    text-align: center;
    color: #bbb;
    font-size: 13px;
    cursor: pointer;
    border-radius: 3px;
}
.sort-item:hover { background: #3a3a3a; color: #fff; }
.sort-item.is-on {
    background: linear-gradient(180deg, #4d4d4d, #404040);
    color: #fff;
}

/* 搜索页结果标题（保留） */
.search-heading {
    max-width: 1400px;
    margin: 18px auto 4px;
    padding: 0 20px;
}
.search-heading h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #f2f2f2;
}
.query-term { color: #4aa3df; font-weight: 600; }

/* 弹层 hidden 兜底（theme.css 的 display:flex 会覆盖 hidden） */
.modal-backdrop[hidden] { display: none; }

@media (max-width: 1000px) {
    .filter-spacer { display: none; }
    .dd-res { width: 420px; }
    .swatch-grid { grid-template-columns: repeat(6, 40px); }
    .swatch { width: 40px; }
}
