
/* 流量防御：宽松留白与统一卡片节奏。 */
#tab-defense{max-width:1480px;margin:0 auto}
#tab-defense .panel{padding:28px 30px;border:1px solid #e5eaf2;border-radius:18px;box-shadow:0 3px 15px #26395704;margin-bottom:24px}
#tab-defense .panel-head{gap:18px;margin-bottom:18px;flex-wrap:wrap}
#tab-defense h3{font-size:17px;line-height:1.6;margin-bottom:10px}
#tab-defense h4{margin-bottom:16px;line-height:1.6}
#tab-defense .hint{display:block;line-height:1.85;color:#6b778b;margin:10px 0 18px}
#tab-defense .field{margin-bottom:24px;min-width:0}
#tab-defense .field>label{line-height:1.65;margin-bottom:10px}
#tab-defense .field input:not([type=checkbox]):not([type=radio]),#tab-defense .field select{min-height:44px}
#tab-defense .toggle-field{padding:16px 18px;border:1px solid #e9edf4;background:#f8fafc;border-radius:12px;margin:20px 0}
#tab-defense .toggle-field label{gap:12px;margin-bottom:0}
#tab-defense .toggle-field .hint{margin:9px 0 0 28px}
#tab-defense .cleanup-fields{gap:4px 24px}
#tab-defense .cleanup-grid{gap:24px}
#tab-defense .defense-tabs{gap:12px;margin-top:22px;padding-top:18px;border-top:1px solid #edf0f6}
#tab-defense .defense-tab{padding:11px 18px;border-radius:11px}
#tab-defense .access-editor{padding:24px;margin:24px 0;border-radius:14px}
#tab-defense .access-lists{gap:28px}
#tab-defense table th,#tab-defense table td{padding:15px 16px;line-height:1.7}
#tab-defense .btn+.btn{margin-left:10px}
#tab-defense .panel-head .btn{margin-left:0}
#tab-defense .defense-save-bar{padding:20px 0 0;margin-top:12px;border-top:1px solid #edf0f6;gap:16px}
.theme-picker-block{margin:28px 0;padding:26px 0;border-top:1px solid #edf0f6;border-bottom:1px solid #edf0f6}
.theme-picker-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}
.theme-picker-heading a{font-size:13px;color:#4f46e5;text-decoration:none}
.theme-picker-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-top:20px}
.theme-option{position:relative;min-width:0;padding:14px;border:1px solid #e2e7f0;border-radius:15px;background:#fff;transition:box-shadow .15s,border-color .15s}
.theme-option:has(input:checked){border-color:#6b63dd;box-shadow:0 0 0 2px #7067dd20;background:#fcfbff}
.theme-option label{display:block;cursor:pointer}
.theme-option .theme-mini{height:102px;border-radius:9px;overflow:hidden;position:relative;background:var(--swatch);border:1px solid #00000009;margin-bottom:14px}
.theme-mini:before{content:'';position:absolute;inset:14px 20%;border:1px solid #ffffff80;border-radius:10px;background:#ffffffcf;box-shadow:0 5px 12px #15254418}
.theme-mini:after{content:'拖动拼图完成验证 →';position:absolute;left:25%;right:25%;bottom:26px;padding:5px 2px;border-radius:5px;font-size:9px;color:var(--tone);text-align:center;background:#ffffffb5}
.theme-mini img{position:absolute;left:25%;width:50%;top:23px;height:32px;object-fit:cover;border-radius:4px}
.theme-option[data-theme=midnight] .theme-mini:before{background:#1c2844ed;border-color:#7785af70}
.theme-option[data-theme=midnight] .theme-mini:after{background:#354260;color:#e2e8ff}
.theme-option[data-theme=paper] .theme-mini:before{border-radius:4px;background:#fffaf0}
.theme-choice-line{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:600;color:#253149}
.theme-choice-line input{width:17px;height:17px;accent-color:#6255d9;flex-shrink:0}
.theme-option small{display:block;margin:8px 0 14px 26px;font-size:12px;line-height:1.65;color:#738095}
.theme-option button{width:100%;border:1px solid #e3e7ee;background:#fff;border-radius:8px;padding:8px;cursor:pointer;color:#5a6577;font:inherit;font-size:12px}
.theme-current{font-size:12px;color:#6655bf;background:#f2efff;padding:7px 12px;border-radius:8px}
.theme-preview-mask{position:fixed;inset:0;z-index:1000;background:#18243b80;backdrop-filter:blur(5px);display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;gap:18px;overflow:auto}
.theme-preview-mask[hidden]{display:none!important}
.theme-preview-close{border:1px solid #ffffff50;border-radius:99px;padding:9px 18px;background:#ffffffed;color:#3c4b65;cursor:pointer;font:inherit;font-size:13px}
.theme-demo-note{color:#79879b;font-size:12px;line-height:1.8;margin:18px 0 0}
.theme-gallery{max-width:1340px;margin:0 auto;padding:50px 30px 60px;font-family:-apple-system,BlinkMacSystemFont,'Microsoft YaHei',sans-serif;color:#27334b}
.theme-gallery h1{font-size:29px;letter-spacing:.5px;margin:14px 0}
.theme-gallery-intro{line-height:1.9;font-size:14px;color:#738095;max-width:780px;margin-bottom:38px}
.theme-gallery-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:36px 28px;align-items:start}
.theme-gallery-item{min-width:0}
.theme-gallery-item>h2{font-size:16px;margin:0 0 7px}.theme-gallery-item>p{font-size:12px;color:#7c8798;margin:0 0 18px;line-height:1.8}
.theme-gallery .cs-defense-card{max-width:none;min-height:430px}
@media(max-width:1150px){.theme-picker-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.theme-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){#tab-defense .panel{padding:20px 18px;margin-bottom:20px}#tab-defense .access-editor{padding:18px}#tab-defense .cleanup-fields{grid-template-columns:minmax(0,1fr)}.theme-picker-grid{gap:12px}.theme-option{padding:10px}.theme-option small{margin-left:0}.theme-mini:before{inset:14px 10%}.theme-mini:after{left:16%;right:16%;font-size:8px}.theme-mini img{left:16%;width:68%}.theme-gallery{padding:30px 18px}.theme-gallery-grid{grid-template-columns:1fr;gap:32px}.theme-gallery .cs-defense-card{min-height:0}.theme-preview-mask{padding:18px}.theme-picker-block{margin:24px 0}}

#contentRuleRows select{min-width:220px;max-width:100%;padding:10px 12px;border:1px solid #e0e5ee;border-radius:9px;background:#fff;color:#37465d;font:inherit;font-size:13px}
.theme-option[data-theme=random]{grid-column:1/-1;background:linear-gradient(110deg,#f2f4ff,#f0faf4);display:grid;grid-template-columns:1fr auto;gap:20px;align-items:center;border-style:dashed}
.theme-option[data-theme=random] .theme-mini{display:none}.theme-option[data-theme=random] small{margin-bottom:0}.theme-option[data-theme=random] button{width:auto;padding:10px 16px}
.theme-option[data-theme=forest] .theme-mini:before{border-radius:22px 22px 7px 7px;background:#f2f7ed}
.theme-option[data-theme=sunset] .theme-mini:before{border-radius:3px;border:1px dashed #c69271;background:#fff0de}
.theme-option[data-theme=midnight] .theme-mini:before{border-radius:3px}
.theme-option[data-theme=paper] .theme-mini:before{border:1px solid #9d927b;border-radius:0;box-shadow:3px 3px #c6bda5}
@media(max-width:650px){.theme-option[data-theme=random]{grid-template-columns:1fr;gap:12px}.theme-option[data-theme=random] button{width:100%}}

.theme-preview-mask{box-sizing:border-box;padding:max(18px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left))}
.theme-preview-mask .theme-preview-card{min-height:0;overflow-y:auto;overscroll-behavior:contain;flex-shrink:1;max-height:calc(100vh - 110px);max-height:calc(100dvh - 110px - env(safe-area-inset-top) - env(safe-area-inset-bottom));border-radius:12px}
.theme-preview-mask .theme-preview-close{min-height:44px;flex-shrink:0}
.theme-option button{min-height:44px}
@media(max-width:650px){#tab-defense .field input:not([type=checkbox]):not([type=radio]),#tab-defense .field select,#contentRuleRows select{font-size:16px}.theme-choice-line{line-height:1.7}.theme-option button{font-size:13px}}
@media(max-width:359px){.theme-picker-grid{grid-template-columns:1fr}}
