.cfg-app{padding:125px 28px 50px;background:#faf9f6;color:#24231f;min-height:80vh}.cfg-heading{display:flex;justify-content:space-between;align-items:end;gap:24px;margin-bottom:28px}.cfg-heading h1{font-size:clamp(28px,3vw,46px);font-weight:400;margin:8px 0}.cfg-heading p{font-size:13px;letter-spacing:.05em}.cfg-layout{display:grid;grid-template-columns:220px minmax(0,1fr) 280px;border:1px solid #ddd9d0;min-height:620px}.cfg-library,.cfg-inspector{padding:20px;background:#fff;min-width:0}.cfg-library{border-right:1px solid #ddd9d0}.cfg-inspector{border-left:1px solid #ddd9d0}.cfg-app h2{font-size:20px;margin:0 0 20px;font-weight:400}.cfg-app label{display:block;font-size:13px;margin:12px 0}.cfg-app input,.cfg-app select{display:block;width:100%;padding:10px;border:1px solid #ccc7bc;background:#fff;color:#24231f;font:inherit;margin-top:5px}.cfg-app button{font:inherit;font-size:13px;padding:10px 12px;background:#fff;border:1px solid #ccc7bc;color:#24231f;cursor:pointer}.cfg-app button:hover{background:#eeeae1}.cfg-app button:disabled{opacity:.4;cursor:default}.cfg-app :focus-visible{outline:2px solid #75664f;outline-offset:3px}.cfg-product{display:block;width:100%;text-align:left;margin:12px 0}.cfg-product img{width:100%;height:110px;object-fit:contain;background:#f6f5f1}.cfg-product span{display:block;margin-top:8px}.cfg-workspace{position:relative;min-width:0;background:#f1f0ec;display:flex;flex-direction:column}.cfg-toolbar{display:flex;flex-wrap:wrap;gap:6px;padding:12px}.cfg-toolbar button{background:transparent}#cfg-stage{height:500px;min-height:340px;flex:1;position:relative;overflow:hidden}#cfg-stage canvas{display:block;width:100%;height:100%;touch-action:none}.cfg-hint,#cfg-status{font-size:12px;padding:0 18px;margin:8px 0 12px}#cfg-status{min-height:1.5em;color:#62583f}.cfg-position{display:grid;grid-template-columns:1fr 1fr;gap:0 10px}.cfg-position input{min-width:0}.cfg-actions{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0}.cfg-note{font-size:12px;line-height:1.6;color:#746e61;margin-top:16px}.cfg-app .cfg-primary{background:#24231f;color:#fff;width:100%;padding:16px}.cfg-empty{padding:80px 20px;text-align:center}.cfg-empty p{margin:20px}.cfg-app [hidden]{display:none!important}#cfg-summary{font-size:14px;line-height:1.6;margin:20px 0}.cfg-library #cfg-products{max-height:580px;overflow:auto}
@media(min-width:1600px){.cfg-layout{grid-template-columns:260px minmax(0,1fr) 320px}#cfg-stage{height:650px}}
@media(max-width:1100px){.cfg-layout{grid-template-columns:180px minmax(0,1fr)}.cfg-inspector{grid-column:1/-1;border-top:1px solid #ddd9d0;border-left:0}.cfg-position{grid-template-columns:repeat(3,1fr)}.cfg-heading>p{display:none}}
@media(max-width:650px){.cfg-app{padding:100px 12px 30px}.cfg-layout{display:flex;flex-direction:column}.cfg-workspace{order:0}.cfg-library{order:1;border:0;border-top:1px solid #ddd9d0}.cfg-inspector{order:2}.cfg-library #cfg-products{display:flex;gap:10px;overflow:auto}.cfg-product{flex:0 0 140px}.cfg-product img{height:85px}#cfg-stage{height:370px;flex:auto}.cfg-toolbar{gap:4px}.cfg-toolbar button{padding:8px}.cfg-library h2{margin-bottom:10px}}
#cfg-materials fieldset{min-width:0;margin:12px 0;padding:12px;border:1px solid #dedbd3;border-radius:6px}#cfg-materials legend{max-width:100%;padding:0 4px;overflow-wrap:anywhere;font-size:13px}#cfg-materials input[type=color]{display:block;width:100%;height:38px;padding:3px;cursor:pointer}#cfg-materials button{margin-top:8px}#cfg-materials select{margin-top:8px}#cfg-materials p{font-size:12px;color:#777}
/* Keep the canvas and controls independent of the number of materials. */
.cfg-layout{grid-template-columns:190px minmax(0,1fr) 310px;height:calc(100dvh - 260px);min-height:420px;max-height:900px;overflow:hidden;border-radius:10px}.cfg-library,.cfg-inspector{min-height:0;overflow:auto;overscroll-behavior:contain}.cfg-workspace{min-height:0}#cfg-stage{height:auto;min-height:240px}.cfg-library #cfg-products{max-height:none}.cfg-heading{margin-bottom:18px}.cfg-app{padding-bottom:24px}.cfg-inspector h2{margin-bottom:12px}.cfg-placement{margin:10px 0}.cfg-placement summary{cursor:pointer;font-size:13px;color:#746e61}#cfg-materials h3{font-size:16px;font-weight:500;margin:18px 0 10px}.cfg-swatches{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:280px;overflow:auto;overscroll-behavior:contain;padding:3px}.cfg-app .cfg-swatch{min-width:0;padding:6px;text-align:left;border-radius:6px;margin:0!important}.cfg-swatch img,.cfg-chip{display:block;width:100%;height:72px;object-fit:cover;border-radius:3px}.cfg-swatch span{display:block;font-size:12px;overflow-wrap:anywhere;margin-top:6px}.cfg-app [aria-pressed=true]{border:2px solid #82745e;background:#f2eee6}.cfg-note{margin:12px 0 0}.cfg-actions{margin:12px 0}#cfg-summary{margin:12px 0}#cfg-materials>p{line-height:1.5}#cfg-materials>button{width:100%}
@media(min-width:1600px){.cfg-layout{grid-template-columns:230px minmax(0,1fr) 340px}#cfg-stage{height:auto}}
@media(min-width:851px) and (max-width:1100px){.cfg-layout{grid-template-columns:150px minmax(0,1fr) 270px}.cfg-inspector{grid-column:auto;border-top:0;border-left:1px solid #ddd9d0;padding:14px}.cfg-library{padding:12px}}
@media(max-width:850px){.cfg-layout{display:grid;grid-template-columns:minmax(0,1fr);height:auto;max-height:none;min-height:0;overflow:visible}.cfg-workspace{grid-row:1;height:44dvh;min-height:320px}.cfg-library{grid-row:2;padding:12px;max-height:210px;border:0;border-top:1px solid #ddd9d0}.cfg-library h2{display:none}.cfg-library label{margin:0}.cfg-library #cfg-products{display:flex;gap:8px;max-height:135px}.cfg-product{flex:0 0 120px;margin:8px 0}.cfg-product img{height:60px}.cfg-inspector{grid-row:3;grid-column:auto;max-height:500px;border:0;border-top:1px solid #ddd9d0}.cfg-swatches{grid-template-columns:repeat(3,minmax(0,1fr));max-height:220px}#cfg-stage{height:auto;min-height:190px;flex:1}.cfg-toolbar{padding:8px}.cfg-hint{display:none}.cfg-heading{margin-bottom:12px}.cfg-heading h1{font-size:27px}.cfg-heading>p{display:none}}
