:root{--ink:#272b2b;--muted:#747974;--line:#dfdfd7;--paper:#faf9f5;--accent:#4d5d52;--selected:#edf1e9}*{box-sizing:border-box}[hidden]{display:none!important}html,body{margin:0;height:100%;background:var(--paper);color:var(--ink);font:14px -apple-system,BlinkMacSystemFont,"PingFang SC","Segoe UI",sans-serif}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.4}button:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #9d7950;outline-offset:3px}main{display:grid;grid-template-columns:minmax(0,1fr) 400px;min-height:100dvh}#stage{position:relative;height:100dvh;min-height:650px;min-width:0;overflow:hidden;background:#dededb}#case-model{position:absolute;inset:0;width:100%;height:100%;border:0}.brand{position:absolute;z-index:6;top:32px;left:40px;right:40px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;pointer-events:none}.brand>*{pointer-events:auto}#case-navigation{grid-column:1;justify-self:start;min-width:0}#model-source{grid-column:2;display:flex;gap:3px;padding:4px;border-radius:24px;background:var(--paper);height:44px}#model-source button{border:0;background:transparent;color:var(--ink);border-radius:20px;padding:0 16px;font-size:13px;white-space:nowrap}#model-source button.active{background:var(--accent);color:#fff}.quick{grid-column:3;justify-self:end;display:flex;gap:8px;white-space:nowrap}.quick button{height:40px;padding:0 18px;border:0;border-radius:22px;background:var(--paper);color:var(--ink);font-size:13px}.case-dropdown{position:relative}.case-selector{height:44px;min-width:208px;padding:0 42px 0 16px;border:0;border-radius:10px;background:var(--paper);color:var(--ink);text-align:left;font-weight:550;position:relative;white-space:nowrap}.case-selector:after{content:'';position:absolute;right:18px;top:17px;width:7px;height:7px;border:solid var(--accent);border-width:0 1.5px 1.5px 0;transform:rotate(45deg)}.case-menu{position:absolute;top:52px;left:0;min-width:256px;max-height:calc(100dvh - 120px);overflow:auto;background:var(--paper);border:1px solid var(--line);padding:8px;border-radius:12px;box-shadow:0 12px 30px #0002}.case-menu button{display:block;width:100%;height:44px;border:0;background:transparent;text-align:left;padding:0 12px;border-radius:6px;color:var(--ink)}.case-menu button.active{background:var(--selected)}.case-menu button.active:after{content:'✓';float:right;color:var(--accent)}.case-menu button:hover{background:#eeeee8}.hero,.sub{display:none}.model-tools{position:absolute;z-index:2;left:24px;right:24px;bottom:130px;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:8px}.model-tools:empty{display:none}.model-tools button{min-width:100px;padding:11px 16px;border:0;border-radius:22px;background:var(--paper);color:var(--ink);font-size:12px}.model-tools button.active{background:var(--accent);color:#fff}#views{position:absolute;z-index:2;bottom:60px;left:50%;transform:translateX(-50%);display:flex;gap:4px;padding:6px;border-radius:28px;background:var(--paper);max-width:calc(100% - 32px)}#views button{white-space:nowrap;min-width:96px;padding:11px 18px;border:0;border-radius:22px;background:transparent;color:var(--ink);font-size:13px}#views button.active{background:var(--accent);color:#fff}.stage-footer{position:absolute;z-index:2;bottom:24px;left:40px;right:40px;display:flex;justify-content:space-between;gap:12px;font-size:11px;color:var(--muted)}.stage-footer button{border:0;background:transparent;color:inherit;font-size:inherit}.stage-footer button.active{color:var(--accent);font-weight:600}.dark-stage .stage-footer{color:#d6ded7}#status{position:absolute;inset:0;z-index:5;display:flex;align-items:center;justify-content:center;background:#e9e8e4;padding:24px;pointer-events:none}aside{height:100dvh;overflow-y:auto;padding:32px;display:flex;flex-direction:column;min-width:0;z-index:4;background:var(--paper)}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:66px;padding-bottom:20px}.panel-heading h2{margin:0;font-size:26px;font-weight:550}.panel-heading span{font-size:12px;color:var(--muted)}section{border-top:1px solid var(--line);padding:24px 0}section h3{font-size:14px;font-weight:550;margin:0 0 20px;display:flex;justify-content:space-between}section h3 span{font-size:11px;color:var(--muted);font-weight:400}.swatches{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}.swatch{width:34px;height:34px;border-radius:50%;padding:0;border:3px solid var(--paper);box-shadow:0 0 0 1px transparent;justify-self:center}.swatch.active{box-shadow:0 0 0 2px var(--accent)}.option-note{margin:18px 0 0;font-size:12px;color:var(--muted)}.choices{display:flex;gap:10px;flex-wrap:wrap}.choices.cards{display:grid;grid-template-columns:1fr}.choice-card{display:flex;align-items:center;gap:16px;width:100%;min-height:68px;padding:10px 16px;border:1px solid var(--line);border-radius:10px;background:transparent;text-align:left;color:var(--ink)}.choice-card.active{border-color:var(--accent);background:var(--selected)}.choice-card img{width:46px;height:46px;object-fit:contain}.choice-card span{font-size:13px}.choice-card small{display:block;color:var(--muted);font-size:10px}.lighting{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.lighting button{height:40px;border:0;border-radius:8px;background:transparent;color:var(--ink);font-size:12px;padding:0 4px}.lighting button.active{background:var(--accent);color:#fff}.field{display:flex;flex-direction:column;gap:12px;color:var(--muted);font-size:12px;margin:0 0 20px}.field select{width:100%;height:48px;padding:0 14px;border:1px solid var(--line);border-radius:8px;color:var(--ink);background:white}.field input{max-width:100%}.custom-color{margin-top:16px;color:var(--muted);font-size:12px}.custom-color summary{cursor:pointer}.custom-color input{display:block;margin-top:12px;width:100%;height:36px;border:1px solid var(--line);background:#fff}.summary{margin-top:auto;padding-bottom:0}#summary .row{display:flex;justify-content:space-between;gap:12px;font-size:12px;line-height:2.3;color:var(--muted)}.row strong{color:var(--ink);font-weight:400;text-align:right;overflow-wrap:anywhere}.primary,.secondary{width:100%;min-height:40px;border-radius:10px;font-size:13px;margin-top:12px}.primary{background:var(--accent);color:white;border:0}.secondary{background:transparent;border:0;color:var(--ink)}.secondary-actions{display:flex;gap:12px;margin-top:8px;flex-wrap:wrap}.secondary-actions button{border:0;background:transparent;color:var(--muted);font-size:11px;padding:4px 0}#save-controls>.secondary:nth-of-type(3){font-size:11px;color:var(--muted);min-height:24px;margin-top:8px}#message{font-size:12px;color:var(--accent);line-height:1.6;margin-top:8px}.apply{width:100%;padding:12px;border:1px solid var(--line);background:var(--selected);border-radius:8px;color:var(--accent)}.reference-gallery{width:min(1200px,calc(100vw - 48px));max-width:none;height:min(840px,calc(100dvh - 48px));max-height:none;padding:24px;border:0;border-radius:16px;background:var(--paper);color:var(--ink);overflow:hidden}.reference-gallery::backdrop{background:#0f1511a0}.reference-gallery[open]{display:flex;flex-direction:column;gap:16px}.reference-head{display:flex;align-items:center;justify-content:space-between;gap:16px;flex:none}.reference-head h2{font-size:20px;margin:0;font-weight:550}.reference-close{border:0;background:transparent;color:var(--ink);height:40px;padding:0 16px;white-space:nowrap}.reference-body{display:flex;gap:24px;min-height:0;flex:1}.reference-thumbnails{width:160px;flex:none;display:flex;flex-direction:column;gap:12px;overflow-y:auto;padding:2px}.reference-thumbnail{border:1px solid var(--line);border-radius:8px;padding:4px;background:#fff;text-align:left;flex:none;color:var(--ink)}.reference-thumbnail.active{outline:2px solid var(--accent);outline-offset:-2px;background:var(--selected)}.reference-thumbnail img{display:block;width:100%;height:80px;object-fit:contain;background:white}.reference-thumbnail span{display:block;padding:6px 4px;font-size:12px}.reference-main{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;gap:12px}.reference-main h3{font-size:15px;margin:0;font-weight:550}.reference-main>img{width:100%;min-height:0;flex:1;object-fit:contain;border-radius:10px}.reference-error{color:#a34336;margin:0;font-size:12px}.reference-error:empty{display:none}.reference-footer{display:flex;justify-content:space-between;align-items:center;gap:16px;flex:none;font-size:12px;color:var(--muted)}.reference-pagination{display:flex;gap:12px}.reference-pagination button{height:40px;border:0;background:transparent;color:var(--ink);padding:0 18px;white-space:nowrap}
@media(min-width:681px) and (max-width:1180px){main{grid-template-columns:minmax(0,1fr) 320px}aside{padding:24px}.brand{left:20px;right:20px;gap:8px}.case-selector{min-width:145px;font-size:12px;padding-left:12px}.quick button{padding:0 11px;font-size:11px}#model-source button{padding:0 9px;font-size:11px}#views button{min-width:70px;padding:10px 11px;font-size:11px}.model-tools button{min-width:75px;font-size:11px}}
@media(max-width:680px){main{display:block}#stage{height:76dvh;min-height:540px}aside{height:auto;padding:24px}.brand{top:20px;left:16px;right:16px;gap:8px;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}.case-selector{min-width:0;width:100%;font-size:12px;height:38px;padding:0 24px 0 10px}.case-selector:after{right:10px;top:14px}#case-navigation{width:100%}#model-source{height:38px;padding:3px}#model-source button{padding:0 8px;font-size:10px}.quick{gap:6px}.quick button{height:36px;padding:0 10px;font-size:11px}.brand:has(#model-source:not([hidden])){grid-template-columns:minmax(90px,1fr) auto minmax(0,1fr)}.brand:has(#model-source:not([hidden])) .quick{grid-column:1 / 4;justify-self:end}.brand:has(#model-source:not([hidden])) #model-source{position:absolute;left:50%;transform:translateX(-50%)}.brand:has(#model-source[hidden]) .quick{grid-column:2 / 4}.case-menu{min-width:220px}.model-tools{left:12px;right:12px;gap:6px}.model-tools button{min-width:0;padding:9px 12px;font-size:11px}#views{bottom:58px;max-width:calc(100% - 20px);gap:2px;padding:5px;width:max-content}#views button{min-width:0;padding:10px 12px;font-size:11px}.stage-footer{left:16px;right:16px;bottom:20px;font-size:10px}.panel-heading{min-height:56px}.panel-heading h2{font-size:24px}.summary{margin-top:24px}.reference-gallery{width:calc(100vw - 24px);height:calc(100dvh - 32px);padding:16px;gap:12px!important}.reference-head h2{font-size:16px}.reference-close{padding:0 6px;font-size:12px}.reference-body{flex-direction:column-reverse;gap:12px}.reference-thumbnails{width:100%;height:106px;flex-direction:row;overflow-x:auto;overflow-y:hidden}.reference-thumbnail{width:112px}.reference-thumbnail img{height:64px}.reference-main h3{font-size:13px}.reference-footer{gap:8px;flex-wrap:wrap}.reference-footer>span{font-size:10px}.reference-pagination{margin-left:auto;gap:0}.reference-pagination button{padding:0 12px;height:32px}}

@media(max-width:680px){.brand:has(#model-source:not([hidden])){display:block;height:38px;left:12px;right:12px}.brand:has(#model-source:not([hidden])) #case-navigation{width:92px}.brand:has(#model-source:not([hidden])) #model-source{top:0;left:50%;height:38px;transform:translateX(-50%)}.brand:has(#model-source:not([hidden])) #model-source button{padding:0 6px;font-size:9px}.brand:has(#model-source:not([hidden])) .quick{position:absolute;right:0;top:0;gap:4px}.brand:has(#model-source:not([hidden])) .quick button{width:32px;padding:0;font-size:0}.brand:has(#model-source:not([hidden])) .quick #original-reference-button{width:40px}.brand:has(#model-source:not([hidden])) .quick #original-reference-button:before{content:'原图';font-size:11px}.brand:has(#model-source:not([hidden])) .quick button:not(#original-reference-button):before{content:'↺';font-size:18px}}

.reference-footer>span{max-width:72%;line-height:1.6}.reference-pagination button:disabled{cursor:default;opacity:.4}@media(max-width:680px){.reference-footer>span{max-width:100%}}

.reference-thumbnail small{display:block;font-size:10px;color:var(--muted);padding:0 4px 4px}.reference-thumbnail span{padding-bottom:2px}@media(max-width:680px){.reference-thumbnails{height:120px}.reference-thumbnail small{font-size:9px}}


.case-menu{min-width:0;width:192px;max-width:calc(100vw - 32px)}

button{transition:background-color 180ms ease,color 180ms ease,box-shadow 180ms ease,transform 180ms ease}button:active{transform:scale(.97)}@media(prefers-reduced-motion:reduce){button{transition:none}button:active{transform:none}}

#status{flex-direction:column;gap:16px;pointer-events:auto}#status button{padding:10px 22px;border:1px solid var(--line);border-radius:22px;background:var(--paper)}.pending-note{font-size:12px;color:var(--muted);line-height:1.8}
