.agency-layout:has(.site-builder){grid-template-columns:170px minmax(0,1fr);gap:16px}.agency-panel:has(.site-builder){background:transparent;border:0;box-shadow:none}.agency-panel:has(.site-builder) #agency-content{padding:0}.site-builder{min-width:0}.sb-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}.sb-toolbar h2{font-size:22px;margin:0 0 6px}.sb-toolbar p{font-size:12px;color:#7a8ca7;margin:0;line-height:1.7}.sb-toolbar .sb-actions{display:flex;gap:8px;flex-shrink:0}.sb-toolbar button{min-height:40px;padding:10px 16px;font-size:12px}.sb-layout{display:grid;grid-template-columns:310px minmax(0,1fr);gap:18px;align-items:start}.sb-editor,.sb-preview{background:white;border:1px solid #dfe7f3;border-radius:12px;min-width:0;overflow:hidden}.sb-editor{max-height:calc(100vh - 180px);overflow:auto;scrollbar-width:thin}.sb-editor-intro{padding:17px 18px;border-bottom:1px solid #e7edf6}.sb-editor-intro strong{font-size:14px}.sb-editor-intro p{font-size:11px;color:#8a9ab2;margin:5px 0 0}.sb-card{margin:12px;border:1px solid #e1e8f3;border-radius:9px;background:#fff;overflow:hidden}.sb-card[open]{border-color:#a9c1fa;box-shadow:0 2px 9px #315fe808}.sb-card>summary{display:flex;align-items:center;gap:9px;list-style:none;cursor:pointer;padding:14px 12px;font-size:13px;font-weight:600;background:#fcfdff}.sb-card[open]>summary{background:#f1f6ff;color:#2d60dc;border-bottom:1px solid #e0e9fb}.sb-card>summary:after{content:'⌄';margin-left:auto;color:#8296b9}.sb-card>summary::-webkit-details-marker{display:none}.sb-card-index{font-size:10px;color:#7d98c4;background:#edf3ff;border-radius:5px;padding:2px 5px;min-width:23px;text-align:center}.sb-card small{font-size:10px;font-weight:400;color:#97a5b9}.sb-card-body{padding:14px 12px}.sb-card-body .field{display:block;margin:0 0 14px}.sb-card-body .field>span{font-size:11px;font-weight:500;margin-bottom:7px;display:block}.sb-card-body input:not([type=checkbox]):not([type=file]),.sb-card-body textarea{font-size:12px!important;line-height:1.7!important;padding:9px 10px!important;border-radius:6px!important;min-height:38px!important;width:100%;font-weight:400}.sb-card-body textarea{resize:vertical;min-height:76px!important}.sb-card-body input[type=file]{width:100%;font-size:10px;margin-top:8px}.sb-card-body .sb-hint{font-size:10px;line-height:1.8;color:#8a9bb3;margin:10px 0}.sb-card-tools{display:flex;gap:7px;flex-wrap:wrap;align-items:center;border-top:1px solid #edf1f8;padding-top:12px;margin-top:14px}.sb-card-tools button,.sb-item button{min-height:28px;padding:4px 8px;font-size:10px;border-radius:5px}.sb-card-tools label{display:flex;align-items:center;gap:5px;font-size:11px;margin-right:auto;color:#6b809e}.sb-card-tools input{width:14px;height:14px}.sb-item{border:1px solid #e4ebf6;padding:10px;margin:10px 0;border-radius:7px;background:#fafcff}.sb-item .field{margin-bottom:8px}.sb-item>header{display:flex;align-items:center;justify-content:space-between;font-size:10px;color:#8c9db5;margin-bottom:9px}.sb-add{padding:4px 12px 16px}.sb-add label{display:block;font-size:11px;margin:0 0 7px;color:#6c82a4}.sb-add select{width:100%;padding:10px;border:1px solid #dce5f5;border-radius:7px;background:white;color:#49658c;font:inherit;font-size:12px}.sb-add>button{width:100%;margin-top:9px;min-height:39px;font-size:12px;border-style:dashed;color:#3162e8;background:#f8faff}.sb-preview{position:sticky;top:16px;background:#edf1f8}.sb-preview-head{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:13px 16px;background:white;border-bottom:1px solid #e1e8f3;flex-wrap:wrap}.sb-preview-head strong{font-size:13px}.sb-device{display:flex;gap:4px;background:#f3f6fc;padding:3px;border-radius:7px}.sb-device button{font-size:11px;padding:6px 10px;min-height:29px;border:0;background:transparent;color:#8292aa;box-shadow:none}.sb-device button[aria-pressed=true]{background:white;color:#2f60db;box-shadow:0 1px 4px #315da512}.sb-preview-address{display:flex;align-items:center;gap:7px;background:#f7f9fd;border-bottom:1px solid #e2e9f4;padding:10px 15px;font-size:10px;color:#8d9db5}.sb-preview-address i{width:6px;height:6px;border-radius:50%;background:#cbd6e8}.sb-preview-address span{margin-left:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sb-preview-stage{padding:16px;display:flex;justify-content:center;overflow:auto}.sb-preview iframe{display:block;width:100%;height:calc(100vh - 285px);min-height:540px;border:0;background:white;border-radius:7px;box-shadow:0 2px 14px #203e7510}.sb-preview.is-mobile iframe{width:390px;max-width:100%;flex-shrink:0}.sb-status{font-size:11px;padding:11px 16px;color:#8597b0;border-top:1px solid #e0e7f3;background:white;min-height:40px}.sb-status.is-error{color:#d34444;background:#fff8f8}.sb-image{display:block;max-height:100px;max-width:100%;margin:5px 0;border:1px solid #e3eaf6;border-radius:6px}.sb-disabled>summary{opacity:.55}.sb-empty{padding:25px;text-align:center;font-size:12px;color:#92a2b9}.sb-card-body button.sb-danger{color:#c04b56}.sb-card-body button:hover{background:#edf3ff;color:#2658d1}.sb-card-body button:disabled{opacity:.4;cursor:default}
@media(max-width:1450px){.sb-layout{grid-template-columns:285px minmax(0,1fr)}.agency-layout:has(.site-builder){grid-template-columns:155px minmax(0,1fr);gap:13px}.sb-preview-stage{padding:10px}}
@media(max-width:1150px){.agency-layout:has(.site-builder){display:block}.agency-layout:has(.site-builder)>.agency-navigation{margin-bottom:16px}.agency-layout:has(.site-builder) .agency-navigation-head{display:none}.agency-layout:has(.site-builder) .agency-nav-toggle{display:flex;width:100%;justify-content:space-between;border:0;background:white;padding:12px}.agency-layout:has(.site-builder) .agency-nav{display:none}.agency-layout:has(.site-builder) .agency-navigation.is-open .agency-nav{display:block}.sb-layout{grid-template-columns:300px minmax(0,1fr)}}
@media(max-width:750px){.sb-layout{grid-template-columns:1fr}.sb-editor{max-height:550px}.sb-preview{position:static}.sb-toolbar{align-items:flex-start;flex-direction:column}.sb-toolbar .sb-actions{width:100%}.sb-toolbar .sb-actions button{flex:1}.sb-preview iframe{height:620px;min-height:0}.sb-preview-stage{padding:8px}.sb-preview-head{padding:12px}.sb-editor-intro{padding:14px}.sb-toolbar h2{font-size:20px}.sb-status{overflow-wrap:anywhere}}

.sb-add{position:sticky;bottom:0;background:linear-gradient(#fffffff0,#fff 20%);padding:12px;border-top:1px solid #edf1f8;z-index:1}
.sb-add>button{display:flex;align-items:center;justify-content:center;gap:7px;margin:0;min-height:42px;background:#f4f7ff;border:1px dashed #b8ccfa;color:#285ad7;font-weight:600}
.sb-add>button>span{font-size:20px;font-weight:400}
.sb-section-picker{width:1120px;max-width:calc(100vw - 48px);height:740px;max-height:calc(100dvh - 48px);padding:0;border:1px solid #dae3f0;border-radius:14px;box-shadow:0 20px 80px #112d563d;color:#18395e;overflow:hidden}
.sb-section-picker[open]{display:flex;flex-direction:column}
.sb-section-picker::backdrop{background:#14243f66;backdrop-filter:blur(3px)}
.sb-picker-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:21px 24px;border-bottom:1px solid #e6ecf5;flex-shrink:0;background:#fff}
.sb-picker-header h2{margin:0!important;font-size:19px!important}
.sb-picker-header p{font-size:12px;line-height:1.6;color:#8392a9;margin:6px 0 0}
.sb-picker-header>button{font-size:24px;line-height:1;width:34px;height:34px;min-height:34px;padding:0;border:0;box-shadow:none;background:#f5f7fb;color:#7c8aa0}
.sb-picker-layout{display:grid;grid-template-columns:270px minmax(0,1fr);flex:1;min-height:0;background:#f3f6fb}
.sb-picker-library{background:#fff;border-right:1px solid #e6ecf5;display:flex;flex-direction:column;min-height:0}
.sb-picker-search{display:block;padding:16px 14px 12px}
.sb-picker-search>span{display:block;font-size:11px;color:#8191aa;margin-bottom:7px}
.sb-picker-search input{font:inherit;font-size:12px;background:#f6f8fc;width:100%;padding:10px 11px;border:1px solid #e3eaf5;border-radius:7px}
.sb-picker-options{overflow:auto;padding:0 9px 12px;min-height:0}
.sb-picker-options>button{display:flex;align-items:center;gap:11px;width:100%;padding:12px 9px;margin:3px 0;border:1px solid transparent;background:white;text-align:left;box-shadow:none;font-weight:400;border-radius:8px;min-height:64px;color:#526b8d}
.sb-picker-options>button:hover{background:#f6f8fc}
.sb-picker-options>button[aria-pressed=true]{border-color:#d3e1ff;background:#edf3ff;color:#285ad6}
.sb-picker-symbol{display:grid;place-items:center;width:28px;height:28px;background:#f2f5fb;border-radius:6px;flex:0 0 28px;font-size:20px;color:#7492c1}
.sb-picker-options strong{display:block;font-size:13px;font-weight:600;line-height:1.5}
.sb-picker-options small{display:block;font-size:10px;line-height:1.5;color:#8a9ab1;margin-top:4px}
.sb-picker-arrow{margin-left:auto;font-size:18px;color:#7392c4}
.sb-picker-preview{min-width:0;display:flex;flex-direction:column;min-height:0;padding:20px}
.sb-picker-selection{padding:0 0 14px;flex-shrink:0}
.sb-picker-selection h3{font-size:15px;margin:0 0 6px}
.sb-picker-selection p{font-size:12px;color:#8293ab;margin:0;line-height:1.6}
.sb-picker-canvas{flex:1;min-height:0;border:1px solid #dfe7f2;border-radius:9px;background:#fff;overflow:hidden;position:relative;box-shadow:0 3px 16px #26486f05}
.sb-picker-canvas iframe{width:100%;height:100%;border:0;display:block;background:white}
.sb-picker-canvas iframe[hidden],.sb-picker-status[hidden]{display:none}
.sb-picker-status{display:flex;justify-content:center;align-items:center;flex-direction:column;gap:15px;height:100%;margin:0;padding:24px;font-size:13px;text-align:center;color:#8295b0;line-height:1.8}
.sb-picker-empty{padding:20px 12px;color:#8a9bb1;font-size:12px;line-height:1.8}
.sb-picker-footer{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:17px 24px;border-top:1px solid #e5ecf5;background:white;flex-shrink:0}
.sb-picker-footer>span{font-size:11px;color:#8495ae;line-height:1.7}
.sb-picker-footer>div{display:flex;gap:9px;flex-shrink:0}
.sb-picker-footer button{min-height:39px;padding:9px 16px;font-size:12px}
@media(max-width:700px){.sb-section-picker{max-width:calc(100vw - 20px);max-height:calc(100dvh - 20px);height:760px;border-radius:10px}.sb-picker-header{padding:15px}.sb-picker-layout{grid-template-columns:125px minmax(0,1fr)}.sb-picker-search{padding:12px 8px}.sb-picker-search input{padding:9px 6px;font-size:10px}.sb-picker-options{padding:0 5px 10px}.sb-picker-options>button{padding:10px 6px;gap:5px;min-height:48px}.sb-picker-symbol{width:20px;height:24px;flex-basis:20px;font-size:16px}.sb-picker-options strong{font-size:11px}.sb-picker-options small,.sb-picker-arrow{display:none}.sb-picker-preview{padding:12px 8px}.sb-picker-selection h3{font-size:13px}.sb-picker-selection p{font-size:10px}.sb-picker-footer{padding:12px;flex-wrap:wrap;gap:8px}.sb-picker-footer>div{width:100%;justify-content:flex-end}.sb-picker-footer>span{font-size:10px}.sb-picker-status{padding:12px;font-size:11px}}

.sb-card-body .sb-code-field textarea{font-family:Consolas,Monaco,monospace!important;font-size:11px!important;white-space:pre;tab-size:2;min-height:150px!important;background:#fbfcff;color:#35547b}

/* 装修工作台使用剩余视口，卡片与预览各自滚动。 */
@media(min-width:1151px){
 .agency-workspace:has(.site-builder){padding:18px 20px 16px}
 .agency-layout:has(.site-builder){grid-template-columns:170px minmax(0,1fr);gap:16px}
 .site-builder .sb-toolbar{margin-bottom:14px;min-height:48px}
 .sb-layout{height:calc(100dvh - 168px);min-height:360px;align-items:stretch;grid-template-columns:300px minmax(0,1fr);gap:16px}
 .sb-editor{height:100%;max-height:none;min-height:0}
 .sb-preview{height:100%;min-height:0;display:flex;flex-direction:column;position:static}
 .sb-preview-head,.sb-preview-address,.sb-status{flex:0 0 auto}
 .sb-preview-stage{flex:1;min-height:0;padding:10px;overflow:hidden}
 .sb-preview iframe{height:100%;min-height:0}
 .agency-layout:has(.site-builder)>.agency-navigation{max-height:calc(100dvh - 112px)}
}
@media(min-width:1151px) and (max-width:1450px){.sb-layout{grid-template-columns:275px minmax(0,1fr)}}
