.set-search,.set-actions,.set-tabs{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.set-search{margin-bottom:16px}.set-search input{flex:1;min-width:180px}.set-connect{margin-bottom:24px}.set-connect summary{cursor:pointer;margin-bottom:12px}.set-connect input{max-width:350px}.set-connect p{color:#aab2bf;font-size:13px}
.set-search input,.set-connect input,.set-palette input,.set-palette select,.instruction-tools input,.instruction-tools select,.instruction-panel form input{font:inherit;color:#e7ebf2;background:#20242b;border:1px solid #4b5360;border-radius:7px;padding:9px;min-width:0}
.set-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));gap:18px;margin-bottom:22px}
.set-card{display:flex;flex-direction:column;text-align:left;gap:10px;background:#20242a;color:#e8edf5;border:1px solid #454d59;border-radius:12px;padding:16px;cursor:pointer;font:inherit}
.set-card:hover{border-color:#e3ad47;background:#272c34}.set-card img{width:100%;height:180px;object-fit:contain;border-radius:8px;background:#fff}.set-card span{color:#a9b4c3;font-size:13px}
.set-dialog{color:#e8edf5;background:#20242b;border:1px solid #657082;border-radius:14px;padding:24px;width:min(560px,90vw);max-height:90vh;overflow:auto}.set-dialog::backdrop{background:#000a;backdrop-filter:blur(4px)}.set-dialog>img{width:100%;height:220px;object-fit:contain;background:#fff;border-radius:8px}.set-dialog h2{font-size:19px;line-height:1.4}.set-dialog p{color:#b7c0ce;line-height:1.5}.set-actions{margin-top:20px}
.set-dialog button,.set-palette button,.instruction-panel button{font:inherit;border:1px solid #515b6b;border-radius:6px;background:#2a3039;color:#e8edf5;padding:7px 10px;cursor:pointer}.set-dialog button:hover,.set-palette button:hover,.instruction-panel button:hover{border-color:#e3ad47}.set-dialog button:disabled,.set-palette button:disabled,.instruction-panel button:disabled{opacity:.45;cursor:default}
.set-tabs{padding:8px;border-bottom:1px solid #414958}.set-tabs button{flex:1;font:inherit;font-size:12px;border:0;border-radius:5px;padding:8px;background:#262b34;color:#c0c8d3;cursor:pointer}.set-tabs button[aria-pressed=true]{background:#e3ad47;color:#191b20}
.set-palette{max-height:62vh;overflow:auto;padding:8px}.set-palette-tools{display:grid;grid-template-columns:1fr 1fr;gap:6px}.set-palette-tools input{grid-column:1/-1}.set-palette-tools select{width:100%;font-size:12px}.set-palette>p{font-size:11px;color:#b3bdcd;margin:10px 0}.set-palette>a{display:block;margin:12px 0;font-size:11px;color:#b3bdcd}.set-parts-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.set-part{min-width:0;border:1px solid #414957;border-radius:8px;padding:5px;background:#22262e}.set-part>button{font-size:10px;margin-top:5px;padding:5px}.set-part .set-part-take{display:flex;flex-direction:column;text-align:left;gap:6px;width:100%;padding:0;margin:0;border:0;background:transparent;font-size:11px}.set-part-take img{width:100%;height:80px;object-fit:contain;background:#fff;border-radius:5px}.set-part-take span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:30px}.set-part small{font-size:10px;color:#b6bfcd}.set-part-viewer{width:100%;height:300px;overflow:hidden}.set-part-viewer>img{width:100%;height:100%;object-fit:contain;background:#fff}.set-part-viewer canvas{display:block;touch-action:none}
.instruction-panel{left:max(4px,calc(50% - 220px));top:8px;width:440px;max-width:calc(100% - 8px);min-width:min(230px,calc(100% - 8px));max-height:calc(100% - 8px)}
.instruction-panel .editor-panel-header{flex:none;align-items:center;gap:3px;padding:2px 4px}
.instruction-panel .editor-panel-header h2{min-width:16px;gap:5px;padding:4px 2px;font-size:12px}
.instruction-panel h2 span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.editor .instruction-panel .editor-panel-header button{width:25px;height:28px;margin:0;font-size:15px}
.editor .instruction-panel .instruction-more-toggle{font-size:20px}
.instruction-tools{display:flex;align-items:center;gap:3px}
.instruction-tools input,.instruction-tools select{height:25px;padding:2px 3px;border-radius:4px;font-size:12px}
.instruction-tools input{width:calc(4ch + 8px);text-align:center;appearance:textfield}
.instruction-tools input::-webkit-inner-spin-button,.instruction-tools input::-webkit-outer-spin-button{appearance:none;margin:0}
.instruction-tools select{max-width:55px}
.instruction-tools span{font-size:11px;white-space:nowrap;color:#c0c8d5}
.instruction-panel .editor-panel-body{min-height:0;padding:3px}
.instruction-panel .instruction-preview{position:relative;width:min(100%,calc(max(180px,100dvh - 150px) * var(--page-ratio,1.4)));margin-inline:auto}
.instruction-panel iframe{display:block;width:100%;height:52dvh;min-height:220px;border:0;border-radius:3px;background:#ddd}
.instruction-panel p,.instruction-actions{padding:6px;margin:0;font-size:12px;color:#bfc8d7}
.instruction-actions{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px}
.instruction-panel details[open]{flex-basis:100%}
.instruction-panel summary{cursor:pointer}
.instruction-panel form{display:grid;gap:6px;margin-top:6px}
.instruction-panel form p:empty{display:none}
.instruction-panel [hidden],.instruction-panel:has(.editor-panel-body[hidden]) :is(.instruction-tools,.instruction-more-toggle){display:none}
.instruction-panel:has(.editor-panel-body[hidden]){width:max-content!important;min-width:0;height:auto!important}
@media(max-width:720px){.instruction-panel{left:4px;top:56px;width:360px;max-height:calc(100% - 56px)}.set-grid{grid-template-columns:1fr}}
.instruction-preview :is(img,canvas){display:block;width:100%;height:auto;border-radius:3px;background:#fff}
.instruction-preview .instruction-part-region{position:absolute;min-width:0;min-height:0;padding:0;background:transparent;border:1px solid transparent;border-radius:3px}
.instruction-panel .instruction-part-region:hover:not(:disabled),.instruction-panel .instruction-part-region:focus-visible{background:#ffd47944;border-color:#98681a;outline:2px solid #ffbf56;outline-offset:0;z-index:1}
.instruction-part-label{position:absolute;z-index:2;transform:translate(-50%,4px);box-sizing:border-box;max-width:min(13rem,95%);width:max-content;padding:4px 7px;background:#171b22;color:#f8e3ba;border:1px solid #ba873d;border-radius:4px;font-size:11px;line-height:1.35;pointer-events:none}
.instruction-part-label.above{transform:translate(-50%,calc(-100% - 4px))}
.set-part .set-part-take .set-image-fallback{display:block;width:100%;height:80px;min-height:80px;background-color:#eef0f3;border-radius:5px}.set-part-take .set-image-fallback[hidden],.set-part-take img[hidden]{display:none}.set-color{width:14px;height:14px;border:1px solid #9da6b3;border-radius:50%;display:inline-block}
.set-load-more{display:block;min-width:180px;margin:12px auto 24px}.set-load-more[hidden]{display:none}
.set-filters{flex-basis:100%;display:grid;grid-template-columns:1fr 1fr;gap:18px;padding:18px;background:#20242b;border:1px solid #414957;border-radius:10px}.set-filter-selects{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:16px}.set-filter-selects select{width:100%;min-width:0;font:inherit;color:#e7ebf2;background:#292f38;border:1px solid #525c6d;border-radius:6px;padding:10px}.set-filter-range{min-width:0;border:0;padding:0;margin:0}.set-filter-range legend{font-size:13px;color:#c5cfdd;padding:0 0 10px}.set-range-values{display:flex;gap:12px}.set-range-values label{display:flex;align-items:center;gap:7px;flex:1;min-width:0;font-size:12px;color:#b6bfcd}.set-range-values input{width:100%;padding:7px;min-width:0}.set-range-sliders{position:relative;height:28px;margin:12px 8px 0;background:linear-gradient(to right,#49515e 0 var(--from),#e3ad47 var(--from) var(--to),#49515e var(--to) 100%) center/100% 4px no-repeat}.set-range-sliders input[type=range]{position:absolute;left:0;top:0;width:100%;height:28px;padding:0;margin:0;min-width:0;pointer-events:none;appearance:none;-webkit-appearance:none;background:transparent;border:0}.set-range-sliders input[type=range]::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;pointer-events:auto;width:19px;height:19px;border:3px solid #e3ad47;border-radius:50%;background:#20242b;cursor:ew-resize}.set-range-sliders input[type=range]::-moz-range-thumb{pointer-events:auto;width:14px;height:14px;border:3px solid #e3ad47;border-radius:50%;background:#20242b;cursor:ew-resize}.set-range-sliders input[type=range]:focus-visible{outline:2px solid #e3ad47;outline-offset:3px}.set-filter-reset{grid-column:1/-1;justify-self:end}
@media(max-width:720px){.set-filters,.set-filter-selects{grid-template-columns:1fr}.set-filters{gap:14px;padding:12px}}
.instruction-panel .instruction-recognition-status{margin:0;color:var(--muted);font-size:.72rem}
