/* 七乐彩 · 大底二次筛选 · panel-A (手风琴卡片式) */
.spf-overlay{position:fixed;inset:0;background:rgba(3,8,18,.78);z-index:10000;overflow:auto;padding:18px 12px;box-sizing:border-box}
.spf-dialog{max-width:980px;margin:0 auto;background:#0b1220;color:#e8eefc;border:1px solid #26344d;border-radius:16px;box-shadow:0 24px 70px rgba(0,0,0,.55);overflow:hidden;display:flex;flex-direction:column}
.spf-dialog h2{margin:0;font-size:20px}
.spf-dialog h3{margin:0 0 10px;font-size:16px}
.spf-dialog h4{margin:0 0 8px;font-size:13px;color:#f0d58d;font-weight:700}
.spf-dialog header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 18px;border-bottom:1px solid #22304a;background:#101a2e}
.spf-title-wrap{display:flex;flex-direction:column;gap:2px;min-width:0}
.spf-eyebrow{font-size:11.5px;color:#93a4c3;letter-spacing:.5px}
.spf-header-sub{font-size:12px;color:#93a4c3}
.spf-header-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}
.spf-dialog button{font:inherit;border:1px solid #334564;background:#1b2942;color:#e8eefc;border-radius:9px;padding:9px 14px;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:rgba(120,160,220,.35)}
.spf-dialog button:hover:not(:disabled){border-color:#5b78a8;background:#223455}
.spf-dialog button:active:not(:disabled){background:#2f4770;border-color:#84a2d0;transform:scale(.97);transition:background .02s}
.spf-dialog button:disabled{opacity:.45;cursor:not-allowed}
.spf-scroll{padding:16px 18px;display:flex;flex-direction:column;gap:14px}
.spf-dialog label{display:flex;flex-direction:column;gap:5px;font-size:13px;color:#b9c6de}
.spf-dialog input,.spf-dialog select{font:inherit;padding:9px 10px;border:1px solid #334564;border-radius:9px;background:#0d1729;color:#e8eefc;width:100%;box-sizing:border-box}
.spf-dialog input:focus,.spf-dialog select:focus{outline:2px solid #d6a537;outline-offset:1px}
/* 复选框统一：选中绿底 + 白色对勾，变化一眼可见 */
.spf-dialog input[type=checkbox]{-webkit-appearance:none;appearance:none;width:18px!important;min-width:18px;height:18px!important;border:1.5px solid #5b6f96;border-radius:5px;background:#101a2e!important;cursor:pointer;position:relative;flex-shrink:0;box-sizing:border-box;touch-action:manipulation;transition:background .08s,border-color .08s}
.spf-dialog input[type=checkbox]:checked{background:#2f7a4d!important;border-color:#4caf78!important}
.spf-dialog input[type=checkbox]:checked::after{content:"";position:absolute;left:5px;top:1px;width:5px;height:10px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}
.spf-dialog input[type=checkbox]:active{border-color:#84a2d0}
.spf-muted{color:#8fa0bf;font-size:12px;margin:6px 0 0;line-height:1.6}

/* 来源行 */
.spf-source-line{margin:0;padding:11px 14px;background:#101d33;border:1px solid #243552;border-radius:11px;font-size:13px;line-height:1.7}
.spf-source-line strong{color:#f3d27a;display:block;font-size:14px}
.spf-source-line p{margin:4px 0 0;color:#9db0d0}
.spf-source-line small{color:#8fa0bf}

/* 总体 K 金色置顶卡 */
.spf-kcard{background:#342810;border:2px solid #d6a537;border-radius:13px;padding:14px 16px}
.spf-kcard h3{color:#f3d27a}
.spf-kline{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.spf-kbtn{width:46px!important;height:46px!important;padding:0!important;font-size:22px!important;font-weight:700!important;border-color:#d6a537!important;background:#4a3812!important;color:#f3d27a!important;border-radius:11px!important}
.spf-kval{min-width:64px;text-align:center;font-size:34px;font-weight:800;color:#f3d27a;line-height:1}
.spf-kdesc{color:#e8d9ad;font-size:13px}
.spf-knote{margin:9px 0 0;color:#cbb87f;font-size:12px;line-height:1.7}

/* 必含/排除、历史 折叠卡 */
.spf-meta-entry,.spf-add-entry{border:1px solid #354763;border-radius:12px;background:#0e1830;padding:0}
.spf-meta-entry>summary,.spf-add-entry>summary{list-style:none;cursor:pointer;padding:12px 15px;font-size:14px;font-weight:700;color:#dbe5f7;user-select:none}
.spf-meta-entry>summary::-webkit-details-marker,.spf-add-entry>summary::-webkit-details-marker{display:none}
.spf-meta-body,.spf-add-body{padding:0 15px 14px;display:flex;flex-direction:column;gap:10px}
.spf-add-entry{border-style:dashed;border-color:#5a6f96}
.spf-add-go{align-self:flex-start;background:#21406b!important;border-color:#3f639c!important;font-weight:700}

/* 定位 / 邻距 板块 */
.spf-block{border:1px solid #2b3c59;border-radius:13px;background:#0d1628;padding:14px 15px;display:flex;flex-direction:column;gap:10px}
.spf-block-head{display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer;user-select:none;border-radius:9px}
.spf-block-head h3{margin:0;font-size:16px}
.spf-block-chevron{flex-shrink:0;color:#9fb0d0;font-size:14px;transition:transform .15s}
.spf-block.spf-collapsed .spf-block-chevron{transform:rotate(180deg)}
.spf-block.spf-collapsed > :not(.spf-block-head){display:none}
.spf-block-sum{font-size:12px;color:#f3d27a;background:#33280f;border:1px solid #6b5420;border-radius:999px;padding:3px 11px;white-space:nowrap}
.spf-block-enable{flex-direction:row!important;align-items:center;gap:8px;font-size:12.5px;color:#aebcd6}
.spf-block-enable input{width:auto!important;width:16px;height:16px}

/* 金色配额区 */
.spf-quota{background:#211c0d;border:1px solid #6b5420;border-radius:11px;padding:11px 13px}
.spf-quota-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.spf-quota-row>span{font-size:13px;color:#e6d8ae}
.spf-qbtn{width:40px!important;height:40px!important;padding:0!important;font-size:20px!important;font-weight:700!important;border-radius:9px!important;background:#4a3812!important;border-color:#d6a537!important;color:#f3d27a!important}
.spf-qnum{width:78px!important;text-align:center;font-size:20px!important;font-weight:800!important;color:#f3d27a!important}
.spf-qof{color:#c9b87f;font-size:13px}
.spf-quota-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:9px}
.spf-qlink{background:transparent!important;border:none!important;color:#f3d27a!important;text-decoration:underline;padding:2px!important;font-size:12.5px!important}
.spf-quota-hard{flex-direction:row!important;align-items:center;gap:7px;font-size:12.5px;color:#d8c896}
.spf-quota-hard input{width:16px;height:16px}
.spf-quota-note{margin:8px 0 0;color:#b7a878;font-size:12px;line-height:1.65}
.spf-qnum[aria-invalid="true"]{border-color:#e05b6b!important;background:#2a1218!important}

/* 每位：收起态红球行 */
.spf-pos-row{border-top:1px dashed #26364f}
.spf-pos-row:first-of-type{border-top:none}
.spf-pos-trigger{display:flex;align-items:center;gap:10px;width:100%;background:transparent!important;border:none!important;border-radius:0!important;padding:10px 2px!important;min-height:48px;text-align:left;touch-action:manipulation;-webkit-tap-highlight-color:rgba(120,160,220,.3)}
.spf-pos-trigger:hover:not(:disabled){background:transparent!important}
.spf-pos-trigger:active:not(:disabled){background:rgba(90,130,190,.2)!important}
.spf-pos-label{flex-shrink:0;width:82px;font-weight:700;font-size:13px;color:#dfe8f8}
.spf-pos-balls{flex:1;display:flex;flex-wrap:wrap;gap:5px;min-width:0}
.spf-summary-locked{height:var(--spf-summary-height);max-height:var(--spf-summary-height);overflow-y:auto;align-content:flex-start}
.spf-pos-ball{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background:#ba2739;color:#fff;font-size:12px;font-weight:700;border:1px solid #e05a6b;box-shadow:inset 0 -2px 3px rgba(0,0,0,.25)}
.spf-tail-ball{width:26px;height:26px;font-size:12px}
.spf-pos-empty{color:#7f8fae;font-size:12.5px}
.spf-pos-chevron{flex-shrink:0;color:#9fb0d0;font-size:14px;transition:transform .15s}
.spf-rule-state{font-size:11.5px;color:#8497b8;padding:0 2px 8px 90px;line-height:1.5}

/* 编辑器（展开） */
.spf-pos-editor{border:1px solid #3a4c6c;border-radius:11px;background:#0b1424;padding:12px;margin:2px 0 8px}
.spf-pos-grid{display:flex;flex-wrap:wrap;gap:7px}
.spf-pos-editor-foot{display:flex;align-items:center;gap:10px;margin-top:12px;flex-wrap:wrap}
.spf-mini-check{flex-direction:row!important;align-items:center;gap:7px;font-size:12.5px;color:#c6d2e8}
.spf-mini-check input{width:16px;height:16px}
.spf-btn-sm{padding:7px 14px!important;font-size:12.5px!important;border-radius:8px!important}
.spf-btn-sm.ghost{background:transparent!important}
.spf-btn-sm.primary{background:#21406b!important;border-color:#3f639c!important;font-weight:700}

/* 已添加条件独立卡片 */
.spf-added{border:1px solid #354763;border-radius:11px;background:#0e1830;padding:0}
.spf-added[open]{border-color:#5a729c}
.spf-added>summary{list-style:none;display:flex;align-items:center;gap:9px;padding:11px 13px;cursor:pointer;user-select:none}
.spf-added>summary::-webkit-details-marker{display:none}
.spf-added-name{font-weight:700;font-size:13.5px;color:#e3ebf8;flex-shrink:0}
.spf-added-tag{font-size:11px;border-radius:999px;padding:2px 9px;flex-shrink:0;border:1px solid}
.spf-added[data-group="static"] .spf-added-tag{color:#8fc7ff;border-color:#3f6d99;background:#10263d}
.spf-added[data-group="dynamic"] .spf-added-tag{color:#e6b87a;border-color:#8a6634;background:#2c1f0d}
.spf-added-setting{flex:1;min-width:0;color:#f3d27a;font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.spf-added-del{margin-left:auto;flex-shrink:0;width:32px!important;height:32px!important;padding:0!important;border-radius:50%!important;background:transparent!important;border:1px solid #6b4650!important;color:#e08a96!important;font-size:16px!important}
.spf-added-body{padding:0 13px 13px;display:flex;flex-direction:column;gap:10px;border-top:1px solid #26364f;padding-top:12px}
.spf-added-flags{display:flex;gap:16px;flex-wrap:wrap}
.spf-added-flags label{flex-direction:row!important;align-items:center;gap:7px;font-size:12.5px}
.spf-added-flags input{width:16px;height:16px}
.spf-added[data-off]{opacity:.55}
.spf-added[data-off] .spf-added-name::after{content:" · 已停用";color:#e08a96;font-weight:400;font-size:12px}

/* 候选点选（添加条件卡内） */
.spf-choices>summary{list-style:none;cursor:pointer;color:#9fb4d8;font-size:12.5px;padding:4px 0;user-select:none}
.spf-choices>summary::-webkit-details-marker{display:none}
.spf-chip-grid{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}
.spf-value-token{min-width:44px;padding:0 12px;border-radius:9px;font-size:13px}
.spf-ball{border-radius:50%;min-width:40px;width:40px;height:40px;padding:0;font-weight:700}
.spf-ball.is-selected,.spf-value-token.is-selected{background:#2f7a4d!important;border-color:#4caf78!important;color:#fff}
.spf-range{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.spf-range span{color:#9fb0d0}

/* 执行与结果 */
.spf-output{border:1px solid #2b3c59;border-radius:13px;padding:14px 15px;background:#0d1628}
.spf-output progress{width:100%;height:12px;margin:6px 0}

/* 底部操作条 */
.spf-footer{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:13px 18px;border-top:1px solid #22304a;background:#101a2e}
.spf-name-label{flex:1;min-width:180px;flex-direction:row!important;align-items:center;gap:8px}
.spf-name-label input{flex:1}
#spf-run{background:#21406b;border-color:#3f639c;font-weight:700}
#spf-save{background:#234a33;border-color:#3d7a58;font-weight:700}

/* 预览模式 */
.spf-preview-banner{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#342810;border-bottom:2px solid #d6a537;color:#f3d27a;padding:10px 18px;font-size:13px}
.spf-preview-banner[hidden]{display:none}
.spf-preview-banner button{padding:6px 14px!important;font-size:12.5px!important;border-color:#d6a537!important;background:#4a3812!important;color:#f3d27a!important}
.spf-dialog.previewing .spf-no-preview,.spf-dialog.previewing .spf-no-preview-in-preview{display:none!important}
.spf-dialog.previewing .spf-scroll{pointer-events:none}
.spf-dialog.previewing .spf-footer{pointer-events:none}
.spf-close-x{width:38px!important;height:38px!important;padding:0!important;border-radius:9px!important;font-size:17px!important}
.spf-preview-btn{background:transparent!important;border-color:#d6a537!important;color:#f3d27a!important;font-weight:700}

@media(max-width:640px){
 .spf-overlay{padding:0}
 .spf-dialog{border-radius:0;min-height:100vh;border:none}
 .spf-scroll{padding:13px 12px}
 .spf-dialog header{padding:12px 13px}
 .spf-footer{padding:11px 12px}
 .spf-name-label{min-width:100%}
 .spf-pos-label{width:74px;font-size:12.5px}
 .spf-rule-state{padding-left:82px}
}
.spf-tplbar{display:flex;gap:10px;margin:10px 0 4px}
.spf-tplbar button{flex:1 1 0;padding:10px;border-radius:8px;border:1px solid #555;background:#2a2a2a;color:#eee;font-size:14px}
.spf-tiptip{font-size:12px;color:#999;margin:0 0 10px;line-height:1.5}
