:host {
  display:block; color-scheme:light;
  --bg:#f1f4f3; --panel:#fff; --ink:#1b2c2b; --muted:#526665; --line:#d9e2df; --line-strong:#bccdc7;
  --accent:#0d6758; --accent-dark:#084d43; --mint:#e9f4ef; --amber:#8a4c20; --amber-bg:#fff1e4;
  --danger:#a33f31; --danger-bg:#fff0ed; --sheet:#f8faf9; --radius:10px;
  font:14px/1.5 "Instrument Sans","Microsoft YaHei UI","PingFang SC",system-ui,sans-serif;
  color:var(--ink); font-synthesis:none;
}
*{box-sizing:border-box}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:default}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,a:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
h1,h2,h3,h4,p{margin:0}button,select{color:inherit}button{line-height:1.35}strong{font-weight:650}small{font-size:12px}[hidden]{display:none!important}svg{display:block;flex:none}ul{padding:0;margin:0;list-style:none}.mono{font-family:"IBM Plex Mono",Consolas,"Microsoft YaHei UI",monospace;font-variant-numeric:tabular-nums}
.frame{width:100%;margin-inline:auto}
.icon-text,.primary,.control-row,.heading-actions,.export-actions{display:flex;align-items:center}
.icon-text,.secondary,.quiet,.primary,.icon-button{justify-content:center;border:1px solid transparent;background:transparent;gap:7px;border-radius:7px;padding:8px 12px;min-height:34px}
.icon-text svg,.primary svg{width:17px;height:17px}.quiet,.icon-text{color:var(--muted)}.quiet:hover,.icon-text:hover,.icon-button:hover{background:var(--mint);color:var(--accent-dark)}
.secondary{border-color:var(--line-strong);background:var(--panel);color:var(--ink);font-weight:620;white-space:nowrap}.secondary:hover{background:var(--mint);border-color:#8fac9e}
.primary{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:690;min-height:43px;padding-inline:20px;white-space:nowrap}.primary:hover{background:var(--accent-dark)}.primary:disabled{background:#e3ebe7;color:#60706a;border-color:#e3ebe7}
.icon-button{display:inline-flex;width:29px;height:29px;min-height:29px;padding:4px;color:var(--muted);border-radius:5px}.icon-button svg{width:15px;height:15px}.icon-button:disabled{opacity:.35}.icon-button:disabled:hover{background:transparent}
.page-heading{margin:0 0 18px;display:flex;align-items:flex-end;justify-content:space-between;gap:18px}
h1{font-size:clamp(28px,3vw,37px);line-height:1.17;letter-spacing:-.045em;font-weight:760}.page-heading p{margin-top:8px;color:var(--muted);font-size:14px}
.heading-actions{gap:7px}.demo-button{color:var(--accent-dark);font-weight:650}.demo-button svg{width:16px}
.setup{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);background:var(--panel);border:1px solid var(--line);border-radius:var(--radius)}
.setup-cell{padding:14px 19px;display:flex;align-items:flex-start;gap:12px;min-width:0}.setup-cell+.setup-cell{border-left:1px solid var(--line)}
.setup-icon,.preview-icon{background:var(--mint);color:var(--accent);display:grid;place-items:center;width:36px;height:36px;border-radius:7px;flex:none}.setup-icon svg{width:19px;height:19px}.book-cell .setup-icon{background:#edf2f6;color:#3c626d}
.setup-body{min-width:0;flex:1}.field-title{display:block;font-weight:700;margin-bottom:6px}.control-row{gap:9px}
.select-wrap{position:relative;min-width:0;flex:1;max-width:360px}.select-wrap>span{position:absolute;right:10px;top:9px;pointer-events:none;color:var(--muted)}.select-wrap>span svg{width:16px;height:16px}
select,input[type="search"],input[type="text"]{border:1px solid var(--line-strong);background:#fff;border-radius:6px;min-width:0}
#store{appearance:none;width:100%;height:34px;padding:3px 33px 3px 10px}.custom-store{margin-top:8px;padding:6px 9px;width:100%;max-width:360px}.text-action{white-space:nowrap;padding-inline:9px}
.marker{margin-top:7px;font-size:12px;color:var(--muted);display:flex;align-items:center;gap:6px;width:fit-content}.marker input{accent-color:var(--accent);margin:0;width:14px;height:14px}
.book-controls{justify-content:space-between}.book-summary{display:grid;min-width:0}.book-summary strong{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.book-summary span{color:var(--muted);font-size:12px;margin-top:1px}
.book-cell.drag-active,.resource.drag-active{background:var(--mint);outline:2px dashed var(--accent);outline-offset:-4px}
.notice{margin-top:12px;padding:9px 12px;border-left:3px solid var(--accent);background:var(--mint);border-radius:4px;color:var(--accent-dark);white-space:pre-line}.notice[data-level="warning"]{border-color:#af612d;background:var(--amber-bg);color:var(--amber)}.notice[data-level="error"]{border-color:var(--danger);background:var(--danger-bg);color:var(--danger)}
.workspace{display:grid;grid-template-columns:224px minmax(0,1fr) 276px;align-items:start;gap:15px;margin:16px 0 24px;scroll-margin-top:12px}
.products,.editor,.preview{min-width:0;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius)}
.products,.preview{position:sticky;top:76px;max-height:calc(100vh - 158px);display:flex;flex-direction:column}
.sidebar-header,.preview-heading{display:flex;align-items:center;gap:9px;padding:16px 15px 12px}.sidebar-header h2,.preview-heading h2{font-size:15px;letter-spacing:0;font-weight:710}.sidebar-header{justify-content:space-between}
.count{background:#e9eeeb;color:#435c53;font-size:11px;min-width:20px;min-height:19px;display:inline-grid;place-items:center;border-radius:10px;padding:1px 6px;font-variant-numeric:tabular-nums}
.product-search{margin:0 11px 8px;position:relative}.product-search>span{position:absolute;left:8px;top:8px;color:var(--muted)}.product-search svg{width:14px;height:14px}.product-search input{width:100%;padding:6px 6px 6px 29px;font-size:12px}
.product-list{padding:0 7px 8px;overflow-y:auto;overscroll-behavior:contain}.product-button{display:grid;grid-template-columns:38px minmax(0,1fr);gap:9px;width:100%;padding:8px 7px;margin-bottom:3px;text-align:left;background:white;border:1px solid transparent;border-radius:7px;align-items:center;min-height:58px}
.product-button:hover{background:var(--sheet);border-color:var(--line)}.product-button[aria-current="true"]{background:var(--mint);border-color:#bcd5c9}
.product-thumbnail{width:38px;height:38px;object-fit:contain;display:grid;place-items:center;border:1px solid #d8e3df;border-radius:5px;background:#edf2ef;color:#698078}.product-thumbnail svg{width:17px;height:17px}
.product-info{min-width:0}.product-info strong{display:block;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.product-info small{margin-top:3px;display:flex;align-items:center;gap:5px;color:var(--muted);white-space:nowrap;font-size:11px}.state-dot{width:6px;height:6px;display:inline-block;border-radius:50%;background:var(--accent);flex:none}.state-dot.has-error{background:var(--danger)}
.products-bottom{margin-top:auto;border-top:1px solid var(--line);padding:10px 13px;color:var(--muted);font-size:12px}.products-bottom:empty{display:none}.sidebar-empty{padding:6px 10px 12px;color:var(--muted);font-size:12px}
.editor-header{padding:15px 18px 0;border-bottom:1px solid var(--line)}.editor-meta{display:flex;align-items:center;justify-content:space-between;gap:10px}.editor-title-group{display:flex;align-items:center;gap:9px;min-width:0;flex-wrap:wrap}.editor-title-group h2{font-size:20px;line-height:1.3;overflow-wrap:anywhere;font-weight:730}.id-label{color:#376257;background:#edf4f0;border:1px solid #dce8e1;border-radius:4px;padding:1px 5px;font-size:11px;white-space:nowrap}.editor-meta>span{font-size:12px;color:var(--muted);white-space:nowrap}
.scope-tabs{display:flex;gap:20px;margin-top:7px}.scope-tabs button,.preview-tabs button{border:0;border-bottom:2px solid transparent;background:transparent;color:var(--muted);font-size:13px;padding:9px 0 8px;white-space:nowrap;font-weight:630}
.scope-tabs button[aria-selected="true"],.preview-tabs button[aria-selected="true"]{color:var(--accent-dark);border-bottom-color:var(--accent)}
.scope-tabs button:hover,.preview-tabs button:hover{color:var(--accent)}
.resource{padding:11px 16px 13px;border-bottom:1px solid var(--line);scroll-margin-block:18px}.resource:last-child{border-bottom:0}.resource-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:8px}
.resource-title{min-width:0}.resource-title h3{font-size:15px;display:flex;align-items:center;gap:8px;line-height:1.35;font-weight:700}.resource-title h3 svg{width:17px;height:17px;color:var(--accent)}.resource-title h3 .count{margin-left:1px}
.resource-title p{font-size:12px;color:var(--muted);margin:4px 0 0 25px;max-width:72ch}.add-button{border-color:var(--line);min-height:30px;padding:5px 9px;font-size:12px;flex:none}.add-button svg{width:14px;height:14px}.image-unavailable{display:grid;place-items:center;height:100%;color:var(--muted)}
.filmstrip{display:grid;grid-template-columns:repeat(auto-fill,minmax(117px,1fr));gap:8px;align-items:start}.image-card{position:relative;min-width:0;max-width:208px;border:1px solid var(--line);background:var(--sheet);border-radius:7px;overflow:hidden}.image-card[draggable="true"]{cursor:grab}.image-card.dragging{opacity:.43}.image-card.drop-target{outline:2px solid var(--accent);outline-offset:1px}.image-card.excluded{border-color:#dabd9e}.image-card.invalid{border-color:#e2aaa1}
.image-preview{position:relative;display:block;width:100%;padding:0;border:0;background:#eef2f0;aspect-ratio:1.75;overflow:hidden;min-height:58px}.image-preview img{width:100%;height:100%;object-fit:contain;display:block;pointer-events:none}.checker,.resource[data-kind="transparent"] .image-preview{background:repeating-conic-gradient(#e4ebe8 0% 25%,#f7f9f8 0% 50%) 50%/12px 12px}
.slot-badge{position:absolute;left:5px;top:5px;background:#173630;color:white;border-radius:4px;padding:2px 5px;font-size:10px;line-height:1.25}.image-card.invalid .slot-badge{background:var(--danger)}.image-card.excluded .slot-badge{background:var(--amber)}
.image-info{padding:5px 7px 1px;min-width:0}.output-name,.source-name{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.output-name{font-size:11px;color:var(--accent-dark);font-weight:660;line-height:1.35}.source-name{font-size:11px;color:var(--muted);line-height:1.45}.image-controls{padding:0 3px 2px;display:flex;align-items:center;justify-content:space-between;gap:0}.image-controls>span{display:flex}.image-controls .icon-button{height:23px;width:24px;min-height:23px;padding:3px}.image-controls svg{width:13px;height:13px}.image-controls .remove:hover{color:var(--danger);background:var(--danger-bg)}.image-problem{font-size:11px;color:var(--danger);padding:3px 7px 5px;line-height:1.5;overflow-wrap:anywhere}
.slot-label{display:flex;align-items:center;gap:4px;padding:2px 6px;color:var(--muted);font-size:11px}.slot-label>span{white-space:nowrap;flex:none}.slot-label select{font-size:11px;flex:1;min-width:0;height:24px;padding:1px 4px}
.drop-pad{display:flex;align-items:center;justify-content:center;gap:8px;text-align:center;border:1px dashed var(--line-strong);color:#4b6961;background:var(--sheet);border-radius:7px;min-height:76px;width:100%;padding:8px;font-size:12px}.drop-pad svg{width:17px;height:17px}.drop-pad:hover{border-color:var(--accent);background:var(--mint);color:var(--accent-dark)}.drop-pad.add-tile{height:100%;min-height:126px;flex-direction:column;max-width:205px}.drop-pad.add-tile svg{width:21px;height:21px}
.sku-pick{padding:12px 16px;background:var(--sheet);border-bottom:1px solid var(--line)}.sku-controls{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:7px}.sku-controls h3{font-size:13px}.sku-controls input{padding:5px 8px;max-width:180px;font-size:12px}
.sku-list{display:flex;gap:7px;overflow-x:auto;scrollbar-width:thin;padding:4px 3px 7px;margin-inline:-3px}.sku-option{display:grid;flex:none;gap:3px;max-width:184px;min-width:125px;text-align:left;background:#fff;border:1px solid var(--line);border-radius:6px;padding:6px 8px}.sku-option[aria-current="true"]{background:var(--mint);border-color:#8eb8a8;color:var(--accent-dark)}.sku-option:hover{border-color:#8eb8a8}.sku-option strong,.sku-option small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sku-option strong{font-size:12px}.sku-option small{color:var(--muted);font-size:11px}
.sku-context{padding:10px 16px 0;color:var(--muted);font-size:12px}.sku-context strong{color:var(--ink)}.sku-context .status{margin-left:6px}.sku-locked{margin:13px 16px;padding:10px 12px;border-radius:6px;background:var(--amber-bg);color:var(--amber);font-size:12px}
.empty-editor{padding:46px 20px 50px;text-align:center;min-height:365px;display:grid;justify-items:center;align-content:center;gap:11px}.empty-editor .setup-icon{width:47px;height:47px}.empty-editor h2{font-size:19px}.empty-editor p{font-size:13px;color:var(--muted);margin-bottom:3px}
.preview-heading{padding-bottom:7px}.preview-icon{width:29px;height:29px;background:#edf2ef;color:var(--muted)}.preview-icon svg{width:16px;height:16px}
.preview-tabs{padding-inline:14px;display:flex;gap:16px;border-bottom:1px solid var(--line)}.preview-tabs .count{margin-left:5px}.preview-body{min-height:184px;max-height:510px;overflow:auto;scrollbar-width:thin;padding:10px 12px 12px;overscroll-behavior:contain}
.preview-foot{padding:9px 13px;border-top:1px solid var(--line);color:var(--muted);font-size:12px}.preview-foot:empty{display:none}
.tree{font-size:12px}.tree ul{margin-left:7px;padding-left:8px;border-left:1px solid var(--line)}.tree summary,.tree-file{display:flex;align-items:center;gap:5px;min-height:24px;white-space:nowrap;padding:2px 0}.tree summary{cursor:pointer;list-style:none;font-weight:650}.tree summary::-webkit-details-marker{display:none}.tree summary .disclosure{color:#617974}.tree summary .disclosure svg{width:11px;height:11px}.tree details[open]>summary .disclosure{transform:rotate(90deg)}.tree summary:hover{color:var(--accent)}.tree-file{padding-left:3px;color:var(--muted);font-weight:500}.tree-file>span:first-child{color:#68847c}.tree-file svg,.tree-folder svg{width:14px;height:14px}.tree-label{overflow:hidden;text-overflow:ellipsis}.tree-total{margin-left:auto;color:var(--muted);font-weight:500;font-size:11px;flex:none}.preview-empty{color:var(--muted);font-size:12px;padding:8px 3px}
.check-head{font-size:12px;font-weight:700;color:var(--muted);padding:3px 2px 7px}.check-item{margin-bottom:6px;padding:7px 8px;background:var(--sheet);border-left:2px solid var(--accent);border-radius:3px}.check-item.error{background:var(--danger-bg);border-left-color:var(--danger)}.check-item.warning{background:var(--amber-bg);border-left-color:#b5703e}.check-item summary{cursor:pointer;font-weight:660;font-size:12px;line-height:1.4;overflow-wrap:anywhere}.check-item summary:hover{text-decoration:underline}.check-item p{margin:5px 0 2px;color:var(--ink);font-size:12px;overflow-wrap:anywhere}.check-item button{background:transparent;border:0;color:var(--accent-dark);text-decoration:underline;font-size:12px;padding:4px 0 1px}.check-item.error summary{color:var(--danger)}.check-item.warning summary{color:var(--amber)}
.export-bar{position:sticky;bottom:0;z-index:3;background:#fff;border-top:1px solid var(--line);margin-top:12px;box-shadow:0 -4px 18px #1d3e3110}.export-inner{display:flex;justify-content:space-between;align-items:center;min-height:62px;gap:12px}.export-meta{display:grid;gap:1px;min-width:0}.export-status{display:flex;align-items:center;gap:6px;font-weight:700;font-size:13px;color:var(--accent-dark)}.export-status.error{color:var(--danger)}.export-status svg{width:16px;height:16px}.export-counts{font-size:12px;color:var(--muted);white-space:normal}.export-actions{gap:8px}.jump-preview{font-size:12px;min-height:40px}
dialog{padding:0;width:min(560px,calc(100vw - 28px));max-height:calc(100vh - 34px);border:1px solid var(--line);border-radius:11px;background:#fff;color:var(--ink);box-shadow:0 16px 60px #1b302b30;overscroll-behavior:contain}dialog::backdrop{background:#15362f70}.dialog-head{display:flex;justify-content:space-between;align-items:center;padding:13px 16px;border-bottom:1px solid var(--line);gap:10px}.dialog-head h2{font-size:17px;overflow-wrap:anywhere}.dialog-head button{flex:none}#dialog-body{padding:15px 17px 18px}#dialog-body p+p{margin-top:9px}#dialog-body img{display:block;max-width:100%;max-height:64vh;margin:auto;border-radius:7px}#dialog-body .image-dialog-meta{margin-top:9px;color:var(--muted);font-size:13px}.help-list{margin:0;padding-left:21px;list-style:decimal}.help-list li+li{margin-top:9px}
@media(max-width:1240px){.workspace{grid-template-columns:185px minmax(0,1fr) 248px;gap:11px}.resource{padding-inline:12px}.editor-header{padding-inline:14px}.filmstrip{grid-template-columns:repeat(auto-fill,minmax(104px,1fr))}}
@media(max-width:975px){.workspace{grid-template-columns:174px minmax(0,1fr)}.preview{position:static;max-height:none;grid-column:1/-1}.preview-body{max-height:420px}.filmstrip{grid-template-columns:repeat(auto-fill,minmax(123px,1fr))}.jump-preview{display:flex}}
@media(max-width:630px){
.page-heading{align-items:flex-start;margin:0 0 12px;gap:8px}.page-heading p{font-size:12px;margin-top:5px}.heading-actions{flex-direction:column;align-items:stretch;gap:0;flex:none}.heading-actions button{font-size:11px;min-height:28px;padding:4px 6px;white-space:nowrap}.setup{grid-template-columns:minmax(0,1fr)}.setup-cell{padding:11px 12px;gap:8px}.setup-cell+.setup-cell{border-left:0;border-top:1px solid var(--line)}.setup-icon{width:30px;height:30px}.setup-icon svg{width:16px;height:16px}
.workspace{display:flex;flex-direction:column;margin-top:10px;gap:9px}.products,.editor,.preview{width:100%;position:static;max-height:none}.products .sidebar-header{padding:8px 11px 4px;justify-content:flex-start}.product-search{margin-bottom:4px}.product-list{display:flex;gap:5px;overflow:auto;padding-bottom:6px}.product-button{min-width:145px;max-width:200px;width:auto;min-height:49px;padding:5px;flex:none}.product-thumbnail{width:33px;height:33px}.products-bottom{display:none}.editor-header{padding:10px 11px 0}.editor-title-group h2{font-size:17px}.resource{padding:9px 10px 10px}.resource-title p{margin-left:0}.filmstrip{grid-template-columns:repeat(auto-fill,minmax(94px,1fr));gap:6px}.sku-pick{padding-inline:10px}
.export-inner{min-height:60px;gap:5px;padding-block:5px}.export-status{font-size:12px}.export-status svg{width:14px;height:14px}.export-counts{font-size:11px}.export-actions{gap:4px}.primary{padding-inline:9px;min-height:38px;font-size:13px}.primary svg{width:14px;height:14px}.jump-preview{padding:5px;min-height:38px;font-size:11px}.jump-preview svg{display:none}.preview-body{min-height:80px}.heading-actions svg{display:none}}
@media(prefers-reduced-motion:no-preference){button,summary{transition:background-color .13s,border-color .13s,color .13s}}

.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.book-actions,.store-footer{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.book-actions{justify-content:flex-end;flex:none}.book-actions #pick-zip{border-color:#9eb9ad;color:var(--accent-dark);background:#f1f7f4}
.book-actions #pick-zip:hover{background:var(--mint)}.book-actions #pick-zip svg{width:16px;height:16px}
.store-footer{margin-top:6px;min-height:20px;gap:5px 11px}.store-footer .marker{margin:0}.store-source{font-size:11px;color:var(--muted)}
.sync-stores{font-size:11px;padding:2px 5px;min-height:20px;color:var(--accent-dark)}
.resource-count{min-width:30px;white-space:nowrap}.resource-count.over{background:var(--danger-bg);color:var(--danger)}
.image-preview-wrap{position:relative}.image-preview-wrap .image-preview{user-select:none}.image-card:has(.image-grip) .image-preview{cursor:grab}
.image-grip{position:absolute;right:4px;top:4px;display:grid;place-items:center;width:25px;height:24px;border:1px solid #d3dfd9;background:#fffffff2;color:#395950;border-radius:5px;cursor:grab;touch-action:none;user-select:none}
.image-grip svg{width:15px;height:15px;pointer-events:none}.image-card.dragging,.image-card.dragging .image-preview,.image-card.dragging .image-grip{cursor:grabbing}
.image-card.has-warning{border-color:#d7b189}.image-problem.warning{color:var(--amber)}.image-card.has-warning .output-name{color:var(--accent-dark)}
.dialog-intro{color:var(--muted);font-size:13px;margin-bottom:12px}.book-choice{display:grid;gap:7px}.book-choice button{padding:9px 10px;text-align:left;white-space:normal;overflow-wrap:anywhere}
@media(max-width:630px){.book-controls{align-items:flex-start;gap:6px}.book-actions{flex-direction:column;align-items:stretch;gap:5px}.book-actions button{min-height:29px;padding:4px 7px;font-size:11px}.store-source{font-size:10px}.image-grip{width:29px;height:27px}}
#help{display:inline-flex;align-items:center;gap:4px}#help svg{width:15px;height:15px}
