*{box-sizing:border-box}body{margin:0;background:#fbf7ee;color:#25456a;font-family:ui-rounded,'PingFang SC',sans-serif}button,input,select{font:inherit}button{cursor:pointer;background:#fffaf3;color:#25456a;border:1px solid #e8d7bf;border-radius:11px;padding:10px 14px;min-height:44px}button:hover{background:#ffecd9}button:disabled{cursor:default;opacity:.45}input,select{width:100%;border:1px solid #e8d7bf;background:#fffdf8;border-radius:10px;padding:12px;color:#25456a}label{display:block;margin:20px 0 8px;font-size:14px;font-weight:600}#letter{font-size:32px;text-align:center}button:focus-visible,input:focus-visible{outline:2px solid #d9752a;outline-offset:2px}.hint{font-size:13px;line-height:1.8;color:#897969;margin:20px 0}.secondary,#settings-panel button{width:100%;margin:8px 0}#canvas-area{height:100%;display:flex;flex-direction:column;min-height:350px;background:#fffcf6;border:1px solid #eadfce;border-radius:22px;padding:18px 22px}.frame-canvas-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px}#canvas-title{font-family:PF,sans-serif;color:#a85824;font-size:28px;font-weight:400;margin:8px 0}#view-modes{flex-shrink:0}#stage{position:relative;flex:1;min-height:260px}#drawing,#model-view{position:absolute;inset:0;width:100%;height:100%}#drawing{touch-action:none}#drawing [data-item]{cursor:grab}#drawing [data-handle]{cursor:nwse-resize}#drawing [data-handle=rotate]{cursor:crosshair}#loading-indicator{position:absolute;bottom:12px;left:10px;right:10px;pointer-events:none}.under-stage{display:flex;align-items:center;justify-content:space-between;min-height:34px}#dimensions{font-size:12px;color:#897969}#error{color:#b13b28;font-size:13px;line-height:1.5}#error:empty{display:none}#palette{display:grid;grid-template-columns:1fr 1fr;gap:12px}#palette label{margin:0;border:1px solid #eadfce;border-radius:12px;padding:14px;font-size:13px}#palette input{height:52px;padding:0;border:0;background:none;margin:10px 0}#palette span{font-size:12px}#item-color-row{grid-column:1/3}.swatches{display:flex;gap:12px;margin:22px 0}.swatches button{width:42px;height:42px;min-height:42px;border-radius:50%;padding:0}.item-list{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}.item-list button[aria-pressed=true]{background:#ffe2c3}.motif-categories{display:flex;gap:6px;overflow-x:auto;margin:12px 0}.motif-categories button{flex-shrink:0;font-size:12px;padding:6px 9px}.motif-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.motif-card{display:flex;flex-direction:column;align-items:center;gap:8px;font-size:12px;padding:10px 4px}.motif-card img{max-width:100%}.motif-search{margin-top:12px}.shared-motif-picker>.ze-add-content{width:100%}.help{font-size:12px;line-height:1.6}.zl-editor[data-editor=lamp]{--zl-accent:#cc712b;--zl-accent-soft:#ffdfbb;--zl-ink:#25456a;--zl-paper:#fbf7ee}.zl-editor[data-editor=lamp] .zl-inspector{background:#fffaf3}.zl-editor[data-editor=lamp] .zl-stage{padding:12px}.zl-editor[data-editor=lamp] .zl-title,.zl-editor[data-editor=lamp] .zl-panel-title{color:#ac5c24}html body .zl-editor[data-editor=lamp] .zl-tool[aria-selected=true]{background:#ffdfbb!important;color:#ac5c24}html body .zl-editor[data-editor=lamp] .ze-view-modes button[aria-pressed=true]{background:#cf782f!important;color:white!important}html body .zl-editor[data-editor=lamp] #download{background:#ffd7a7!important;color:#7b411d!important;border-color:#edb67a!important}html body .zl-editor[data-editor=lamp] .ze-add-content{background:#ffdfbb!important;color:#9b5223!important}#boot{text-align:center;padding:80px 20px}dialog{border:1px solid #e8d7bf;border-radius:20px;background:#fffcf6;color:#25456a;max-width:600px;width:90%}dialog::backdrop{background:#25201955}.dialog-head{display:flex;align-items:center;justify-content:space-between}#works-list button{display:block;width:100%;margin:10px 0;text-align:left}[hidden]{display:none!important}
@media(max-width:760px){#canvas-area{padding:10px;border-radius:15px}.frame-canvas-toolbar{flex-direction:column;gap:4px}#canvas-title{font-size:21px;margin:2px}#stage{min-height:180px}#view-modes button{font-size:12px;padding:6px 9px}.zl-editor[data-editor=lamp] .zl-stage{padding:6px}#dimensions{font-size:11px}.under-stage{min-height:24px}#error{font-size:11px}#palette{gap:8px}}
/* Match CSS size to the stage; the drawing buffer still uses devicePixelRatio. */
#model-view{overflow:hidden}#model-view canvas{display:block;width:100%;height:100%}

.lamp-editions{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;margin:18px 0}.lamp-editions button{padding:9px 4px;font-size:13px}.lamp-editions small{display:block;font-size:10px;margin-top:5px}.lamp-editions button[aria-pressed=true]{background:#ffdfbb;border-color:#cc712b}#settings-panel fieldset{border:0;padding:8px 0 20px;margin:0;border-bottom:1px solid #eadfce}#settings-panel legend{color:#ac5c24;font-family:PF,sans-serif;font-size:21px}#settings-panel label{margin:12px 0 7px}.lamp-check{display:flex;align-items:center;gap:10px}.lamp-check input{width:20px;height:20px}.lamp-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}#settings-panel .hint{margin:12px 0}#settings-panel output{font-size:12px}#drawing [data-hardware]{cursor:grab}#lamp-fit-result[data-status=collision]{color:#b13b28}#lamp-fit-result[data-status=envelope-fits]{color:#357057}

/* Each size card has a name row and one unbroken dimensions row. */
.zl-editor[data-editor=lamp] .lamp-editions{grid-template-columns:repeat(3,minmax(0,1fr))}.zl-editor[data-editor=lamp] .lamp-editions button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-width:0;padding:12px 2px}.zl-editor[data-editor=lamp] .lamp-editions button>span{display:block;white-space:nowrap}.zl-editor[data-editor=lamp] .lamp-editions small{display:block;white-space:nowrap;font-size:10px;line-height:1.5;margin:0;letter-spacing:-.2px}

#boot{position:fixed;inset:0;z-index:10000;background:#fbf7ee;overflow:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px}#boot .zm-art{display:block;flex:none;width:160px;height:160px;margin:0;pointer-events:none}#boot p{margin:0;font:15px/1.7 "PingFang SC",sans-serif}



#image-panel>.ze-add-content{width:100%}#image-panel .hint{margin:14px 0}#image-panel>.item-list:empty{display:none}#artwork-status:empty{display:none}

.lamp-print-modes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.lamp-print-modes button{min-width:0;padding:12px 6px}.lamp-print-modes button[aria-pressed=true]{background:#ffdfbb;border-color:#cc712b}#mini-print-mode .hint{margin:10px 0 18px}

.lamp-thickness{margin:18px 0}.lamp-thickness-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}.lamp-thickness-row input{min-width:0}.lamp-thickness-row button{font-size:12px;padding:10px}.lamp-thickness .hint{margin:8px 0 0;font-size:12px}

/* Picture lamp adapter: shared editor shell and page theme. */
.picture-source .picture-upload{width:100%;min-height:88px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;border:1px dashed #c17c40;border-radius:16px;background:#ffe2bf;font:400 15px 'Yuanti SC','PingFang SC',sans-serif;color:#173f73;margin:15px 0;padding:14px;box-shadow:none}
.picture-upload .zb-ui-symbol{width:28px;height:28px}.picture-editions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:15px 0}.picture-editions button{min-height:70px;display:flex;flex-direction:column;align-items:center;gap:5px;background:#fffaf0;border:1px solid #d8bd9d;border-radius:14px;color:#173f73}.picture-editions button[aria-pressed=true]{background:#ffe2bf;border-color:#c17c40}.picture-editions small{font:12px 'Yuanti SC','PingFang SC',sans-serif}.picture-lamp-editor [hidden]{display:none!important}.picture-source p{font:13px/1.6 'Yuanti SC','PingFang SC',sans-serif;color:#355a85}




/* Compact canvas actions: use shared handdrawn symbols, never squeezed text labels. */
html body .zl-editor[data-editor=lamp] .ze-canvas-dock{--za-action-size:40px;overflow:visible;flex-wrap:wrap;flex-basis:auto;min-height:52px}
html body .zl-editor[data-editor=lamp] .ze-canvas-dock .za-canvas-action{position:relative;min-height:40px;height:40px;border:0;border-radius:10px!important;flex:0 0 var(--za-action-size);overflow:visible}
html body .zl-editor[data-editor=lamp] .ze-canvas-dock .za-canvas-action .zb-ui-symbol{width:28px!important;height:28px!important;flex:0 0 28px!important}
html body .zl-editor[data-editor=lamp] .ze-canvas-dock #history{display:flex;flex:0 0 auto;margin-left:auto}
@media(max-width:760px){html body .zl-editor[data-editor=lamp] .ze-canvas-dock{--za-action-size:35px;gap:4px;padding-inline:2px}html body .zl-editor[data-editor=lamp] .ze-canvas-dock .za-canvas-action .zb-ui-symbol{width:25px!important;height:25px!important;flex-basis:25px!important}}
@media(max-width:760px){.picture-lamp-editor #canvas-area{min-height:0;overflow-y:auto}.picture-lamp-editor #stage{min-height:50px}.picture-lamp-editor .frame-canvas-toolbar,.picture-lamp-editor .under-stage{flex-shrink:0}}
/* Picture editor uses the shared headings/text styles and only supplies its theme. */
.picture-lamp-editor{--text-card-soft:#ffe2bf;--text-card-edge:#c17c40;--text-card-hover:#ffdab0;--text-item-hover:#fff1df;--za-selection-ink:#a85824}
.picture-lamp-editor .zl-editor{--ze-section-ink:#25456a;--ze-section-number:#b77534}
html body.picture-lamp-editor .zl-editor .zl-panel-title{font-size:26px!important}
html body.picture-lamp-editor .zl-editor .zl-panel label{font:600 13px/1.5 'Yuanti SC',STYuanti,'Avenir Next','PingFang SC',sans-serif}
html body.picture-lamp-editor .zl-editor .picture-editions{margin:0 0 18px;grid-template-columns:repeat(2,minmax(0,1fr))}
html body.picture-lamp-editor .zl-editor .picture-editions button{width:100%;margin:0;padding:12px 4px;min-width:0;min-height:76px;justify-content:center;gap:6px;font-size:15px;line-height:1.4}
html body.picture-lamp-editor .zl-editor .picture-editions small{font:500 11px/1.5 'Yuanti SC',STYuanti,'Avenir Next','PingFang SC',sans-serif;white-space:nowrap;letter-spacing:-.15px}
.picture-range-field{margin:16px 0 20px;min-width:0}.picture-value-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.picture-value-row label{margin:0!important}.picture-value-row output{flex-shrink:0;color:#25456a;font-size:13px;font-variant-numeric:tabular-nums}
html body.picture-lamp-editor .zl-editor .picture-range-field input[type=range]{display:block;width:100%;height:32px;min-height:32px;margin:7px 0;padding:0;border:0;background:transparent;accent-color:#c17c40;cursor:pointer}
html body.picture-lamp-editor .zl-editor .picture-range-field input[type=range]:focus-visible{outline:2px solid #a85824;outline-offset:3px}
.picture-field-actions{display:flex;justify-content:flex-end;margin-top:8px}
html body.picture-lamp-editor #settings-panel .picture-field-actions button{width:auto;min-height:36px;margin:0;padding:7px 12px;font-size:12px}
html body.picture-lamp-editor .zl-editor #settings-panel>fieldset{padding:0 0 20px;margin:0 0 20px}
.picture-lamp-editor #picture-status:empty{display:none}
html body.picture-lamp-editor .zl-editor #add-text.christmas-text-add{height:auto!important;min-height:88px!important;max-height:none!important;background:var(--text-card-soft)!important;color:#173f73!important;border:1px dashed var(--text-card-edge)!important;font:400 15px/1.5 'Yuanti SC',STYuanti,'Avenir Next','PingFang SC',sans-serif!important}
html body.picture-lamp-editor .zl-editor #add-text.christmas-text-add:hover:not(:disabled){background:var(--text-card-hover)!important;border-color:var(--za-selection-ink)!important}
html body.picture-lamp-editor .picture-source #picture-upload:hover:not(:disabled){background:var(--text-card-hover);border-color:var(--za-selection-ink)}
html body.picture-lamp-editor .zl-editor #add-text.christmas-text-add:focus-visible,html body.picture-lamp-editor #picture-upload:focus-visible{outline:2px solid var(--za-selection-ink);outline-offset:3px}
html body.picture-lamp-editor :is(.zf-trigger,.zf-dialog){--zf-accent:#a85824;--zf-tint:#ffe2bf;--zf-line:#d8bd9d}
html body.picture-lamp-editor .zf-language{color:var(--zf-accent)}
html body.picture-lamp-editor .zf-trigger:focus-visible,html body.picture-lamp-editor .zf-dialog button:focus-visible{outline:2px solid #a85824;outline-offset:3px}
html body.picture-lamp-editor .editor-color-targets button{background:#fffaf0;border-color:#d8bd9d;border-radius:12px;min-height:102px}
html body.picture-lamp-editor .editor-color-targets i{width:58px;height:58px;border-radius:50%}
html body.picture-lamp-editor .editor-color-targets [aria-pressed=true]{background:#ffe2bf;outline:2px solid #c17c40;outline-offset:-2px}
html body.picture-lamp-editor .personal-filament-swatches i{width:min(58px,100%);height:auto;aspect-ratio:1;border-radius:50%}
html body.picture-lamp-editor .personal-filament-swatches button[aria-pressed=true]{background:#ffe2bf;border-color:#c17c40}
@media(max-width:760px){html body.picture-lamp-editor .zl-editor .zl-panel-title{font-size:24px!important}}
.picture-lamp-editor button[aria-label="收起参数面板"]{display:none!important}
.picture-lamp-editor input[type=checkbox]{accent-color:#c17c40}

.picture-print-modes{grid-template-columns:repeat(2,minmax(0,1fr))}.picture-print-modes small{line-height:1.5;white-space:normal}.picture-control-label{font:600 14px var(--ui-font,system-ui);color:var(--blue,#173f73);margin:18px 0 10px}
