:root{font-family:"Microsoft YaHei","PingFang SC",sans-serif;color:#203e33;background:#f4f2e9;--green:#244c3d;--gold:#dbbc75}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button,a,label.upload{touch-action:manipulation}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #be8d3c;outline-offset:3px}header{height:76px;display:flex;align-items:center;justify-content:space-between;padding:0 28px;border-bottom:1px solid #d6ded2;background:#fffcf3;gap:12px}h1{font-size:23px;font-weight:600;letter-spacing:2px;margin:0}header a{color:#476354;text-decoration:none;font-size:14px}header button,.secondary{border:1px solid #c1cdbd;background:transparent;border-radius:6px;color:var(--green);padding:10px 14px}main{height:calc(100dvh - 76px);display:grid;grid-template-columns:minmax(0,1fr) 325px;gap:0}.studio{position:relative;min-width:0;min-height:480px;background:#112e31;overflow:hidden}#stage{width:100%;height:100%;object-fit:contain;display:block}.stage-top{position:absolute;left:28px;right:28px;top:23px;display:flex;justify-content:space-between;gap:12px;pointer-events:none;color:#f4e2ae;font-size:14px;letter-spacing:2px}.stage-top span{padding:9px 13px;background:#0b2631b3;border:1px solid #ddd0ab44;border-radius:4px}.stage-bottom{position:absolute;left:0;right:0;bottom:0;padding:18px 28px 22px;color:#fff8e4;background:linear-gradient(transparent,#09222de6);display:flex;align-items:end;justify-content:space-between;gap:20px;pointer-events:none}.stage-bottom p{font-size:14px;max-width:55%;line-height:1.6;margin:0}.stage-bottom div{display:flex;gap:8px;pointer-events:auto}.light{background:#fff9e8ed;border:1px solid #fff8e6;color:#244637;border-radius:6px;padding:10px 13px;font-size:14px;white-space:nowrap}.light[aria-pressed=true]{background:#e2b957}aside{background:#fffcf3;padding:24px;overflow:auto;border-left:1px solid #d8dece}h2{font-size:21px;font-weight:600;margin:25px 0 17px}.mode-tabs,.placements{display:flex;gap:5px}.mode-tabs{padding:4px;background:#edf0e6;border-radius:8px}.mode-tabs button{width:50%;border:0;background:transparent;border-radius:5px;color:#627267;font-size:15px;padding:10px 3px}.mode-tabs button.selected{background:var(--green);color:#fff}.upload{display:flex;width:100%;align-items:center;justify-content:center;gap:8px;color:#fffef6;background:var(--green);border:0;border-radius:7px;padding:15px 10px;font-size:16px;cursor:pointer}.upload span{font-size:23px}input[type=file]{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}.upload:has(input:focus-visible){outline:3px solid #be8d3c;outline-offset:3px}.hint{font-size:12px;color:#768476;line-height:1.7;margin:10px 0 17px}.samples{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.samples button{height:74px;border:2px solid transparent;border-radius:7px;background:none;padding:3px}.samples button.selected{border-color:#a78138}.samples img{width:100%;height:100%;object-fit:cover;border-radius:4px}.field-label,.range-label,legend{display:block;font-size:14px;color:#48604f;margin:19px 0 8px}input[type=text]{width:100%;padding:10px 12px;border:1px solid #cdd7c6;border-radius:6px;color:#284834;background:#fffef9;font-size:14px}fieldset{border:0;padding:0;margin:0}legend{padding:0}.placements button{width:33%;border:1px solid #c4ceb9;background:#fffdf3;color:#58705b;border-radius:5px;padding:8px;font-size:14px}.placements button.selected{background:#e0ebd9;border-color:#769069;color:#274e39}.range-label{display:flex;justify-content:space-between}input[type=range]{width:100%;accent-color:var(--green);cursor:pointer}#reset{width:100%;margin-top:20px}#switch-camera{width:100%;margin-top:10px}details{margin-top:20px;font-size:12px;color:#7a8775;line-height:1.8}summary{cursor:pointer}details p{margin:8px 0}dialog{border:1px solid #d2dcc8;border-radius:12px;padding:23px;background:#fffcf3;color:#294333;width:min(510px,calc(100vw - 24px));max-height:94dvh;overflow:auto}dialog::backdrop{background:#092c30cb;backdrop-filter:blur(4px)}.dialog-title{display:flex;justify-content:space-between;align-items:center}.dialog-title h2{margin:0}.dialog-title button{border:0;background:none;font-size:25px;color:#345644}dialog p{font-size:13px;color:#7a8775}#crop{width:100%;aspect-ratio:1;display:block;touch-action:none;cursor:move;border-radius:5px;background:#eee9db}dialog .upload{margin-top:18px}body:fullscreen main{height:calc(100dvh - 76px)}@media(max-width:900px){header{padding:0 16px}h1{font-size:18px;letter-spacing:0}main{grid-template-columns:minmax(0,1fr) 280px}aside{padding:18px}.stage-bottom{display:block;padding:17px}.stage-bottom p{max-width:none;margin-bottom:10px}.stage-top{left:15px;right:15px}.studio{min-height:440px}}@media(max-width:640px){header{height:62px;flex-wrap:wrap}header a{font-size:12px}h1{font-size:15px}header button{display:none}main{height:auto;display:flex;flex-direction:column}.studio{height:68dvh;min-height:420px;max-height:700px}aside{overflow:visible;border-left:0;padding:22px}#stage{object-fit:cover}.stage-top{font-size:11px;letter-spacing:0}.samples button{height:90px}.mode-tabs{max-width:100%}.stage-bottom div{justify-content:flex-end}.stage-bottom p{font-size:12px}}


/* Multiple independently editable motifs. */
main{grid-template-columns:minmax(0,1fr) 360px}.editor-hint{font-size:14px;line-height:1.65;color:#657665;margin:0 0 12px}aside h2{margin:20px 0 10px}.layer-list{display:flex;gap:8px;overflow-x:auto;padding:4px 2px 9px;min-height:78px}.layer-chip{flex:0 0 64px;border:2px solid #d7ddce;border-radius:7px;background:#fffdf6;padding:4px;color:#45634d;font-size:12px}.layer-chip.selected{border-color:#a78138;background:#f5edda}.layer-chip img{width:48px;height:42px;object-fit:cover;border-radius:3px;display:block;margin:0 auto 3px}.layer-actions{display:flex;gap:6px}.layer-actions button{padding:8px;font-size:14px}.layer-actions #add-layer{flex:1;background:#e3ecdd}.editing-label{font-size:14px;margin:17px 0 10px;font-weight:600}.layer-actions button:disabled{opacity:.4;cursor:default}#stage{touch-action:none;cursor:grab}.hint{font-size:13px}.samples button{height:60px}.field-label,.range-label,legend{margin-top:13px}#reset{margin-top:12px}@media(max-width:1000px){main{grid-template-columns:minmax(0,1fr) 310px}}@media(max-width:640px){main{display:flex}}
