:root{color:#202823;font-synthesis:none;text-rendering:optimizelegibility;--surface:#fff;--surface-soft:#f4f6f2;--surface-strong:#e9ede8;--line:#d7ddd7;--line-strong:#bdc7bf;--text:#202823;--muted:#677169;--muted-strong:#4b564f;--accent:#276c4d;--accent-hover:#1f593f;--accent-soft:#dcece2;--blue:#397b91;--amber:#a86a21;--danger:#a8443c;--radius:6px;--topbar-height:58px;--statusbar-height:34px;background:#f4f6f2;font-family:Aptos,Microsoft YaHei UI,Segoe UI,system-ui,sans-serif}*{box-sizing:border-box}html,body,#app{width:100%;min-width:320px;min-height:100%;margin:0}body{background:var(--surface-soft);min-height:100dvh;overflow:hidden}button,input,select{font:inherit}button{letter-spacing:0}button:focus-visible,input:focus-visible,select:focus-visible{outline-offset:2px;outline:3px solid #397b9152}.app-shell{grid-template-columns:286px minmax(420px,1fr) 302px;grid-template-rows:var(--topbar-height) minmax(0, 1fr) var(--statusbar-height);background:var(--surface-soft);grid-template-areas:"header header header""controls workspace inspector""status status status";width:100%;height:100dvh;display:grid}.topbar{z-index:20;border-bottom:1px solid var(--line);background:#fffffff5;grid-area:header;justify-content:space-between;align-items:center;min-width:0;padding:0 14px 0 16px;display:flex}.brand-lockup,.top-actions,.button,.icon-button,.local-badge,.viewer-meta,.status-chip,.toggle-row,.part-row,.statusbar,.section-heading{align-items:center;display:flex}.brand-lockup{gap:9px;min-width:0}.brand-lockup strong{flex:none;font-size:16px;line-height:1}.brand-mark{background:var(--accent);color:#fff;border-radius:5px;place-items:center;width:31px;height:31px;display:grid}.brand-mark svg{width:18px;height:18px}.project-name{min-width:0;max-width:280px;color:var(--muted);text-overflow:ellipsis;white-space:nowrap;font-size:13px;overflow:hidden}.project-name:before{color:var(--line-strong);content:"/";margin-right:9px}.top-actions{flex:none;gap:8px}.button,.icon-button{border-radius:var(--radius);cursor:pointer;border:1px solid #0000;justify-content:center;transition:background-color .14s,border-color .14s,color .14s,transform .14s}.button:active:not(:disabled),.icon-button:active:not(:disabled){transform:translateY(1px)}.button:disabled,.icon-button:disabled{cursor:not-allowed;opacity:.48}.button{white-space:nowrap;gap:8px;min-height:36px;padding:8px 12px;font-size:13px;font-weight:650}.button svg,.icon-button svg{flex:none;width:17px;height:17px}.button-primary{background:var(--accent);color:#fff}.button-primary:hover:not(:disabled){background:var(--accent-hover)}.button-secondary{border-color:var(--line);background:var(--surface);color:var(--text)}.button-secondary:hover:not(:disabled){border-color:var(--line-strong);background:var(--surface-soft)}.button-full{width:100%}.icon-button{border-color:var(--line);background:var(--surface);width:36px;height:36px;color:var(--muted-strong);padding:0}.icon-button:hover:not(:disabled){background:var(--surface-soft);color:var(--text)}.icon-button.is-active{background:var(--accent-soft);color:var(--accent);border-color:#9ba}.control-panel,.inspector{background:var(--surface);scrollbar-color:var(--line-strong) transparent;scrollbar-width:thin;min-height:0;overflow:hidden auto}.control-panel{border-right:1px solid var(--line);grid-area:controls}.inspector{border-left:1px solid var(--line);grid-area:inspector}.panel-section{border-bottom:1px solid var(--line);padding:17px 16px 18px}.panel-section:last-child{border-bottom:0}.section-heading{justify-content:space-between;gap:12px;min-height:22px;margin-bottom:12px}.section-heading h2{margin:0;font-size:13px;font-weight:750;line-height:1.25}.section-heading>span{color:var(--muted);text-overflow:ellipsis;white-space:nowrap;font-size:11px;overflow:hidden}.source-preview{aspect-ratio:4/3;border:1px solid var(--line);border-radius:var(--radius);background-color:var(--surface-strong);background-image:linear-gradient(45deg,#dfe4df 25%,#0000 25%),linear-gradient(-45deg,#dfe4df 25%,#0000 25%),linear-gradient(45deg,#0000 75%,#dfe4df 75%),linear-gradient(-45deg,#0000 75%,#dfe4df 75%);background-position:0 0,0 8px,8px -8px,-8px 0;background-size:16px 16px;width:100%;margin-bottom:8px;position:relative;overflow:hidden}.source-preview img{object-fit:contain;width:100%;height:100%;display:block}.local-badge{color:var(--muted);gap:6px;margin:0 0 12px;font-size:11px;line-height:1.35}.local-badge svg{width:14px;height:14px;color:var(--accent)}.segmented{border:1px solid var(--line);border-radius:var(--radius);background:var(--surface-soft);grid-template-columns:repeat(3,minmax(0,1fr));width:100%;height:36px;margin-bottom:18px;padding:2px;display:grid}.segmented button{min-width:0;color:var(--muted-strong);cursor:pointer;background:0 0;border:0;border-radius:4px;font-size:12px;font-weight:650}.segmented button.is-selected{background:var(--surface);color:var(--accent);box-shadow:0 1px 2px #26342b24}.mode-field{margin-bottom:16px}.mode-field>span{color:var(--muted-strong);margin-bottom:7px;font-size:12px;font-weight:600;display:block}.mode-field .segmented{margin-bottom:0}.range-field,.select-field{margin-bottom:16px;display:block}.range-field>span,.select-field>span{min-height:20px;color:var(--muted-strong);justify-content:space-between;align-items:center;gap:12px;margin-bottom:7px;font-size:12px;display:flex}.range-field b{color:var(--muted-strong);font-weight:600}.range-field output{color:var(--text);font-variant-numeric:tabular-nums;font-weight:700}input[type=range]{width:100%;height:18px;accent-color:var(--accent);cursor:pointer;margin:0}.range-field.is-disabled{opacity:.44}.select-field select{border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);width:100%;height:38px;color:var(--text);padding:0 34px 0 10px;font-size:13px}.toggle-row{cursor:pointer;justify-content:space-between;gap:14px;min-height:45px;margin-bottom:14px;position:relative}.toggle-row>span:first-child{gap:3px;min-width:0;display:grid}.toggle-row b{color:var(--muted-strong);font-size:12px;font-weight:650}.toggle-row small{color:var(--muted);text-overflow:ellipsis;white-space:nowrap;font-size:10px;overflow:hidden}.toggle-row input{opacity:0;width:1px;height:1px;position:absolute}.toggle-track{background:#aab3ac;border-radius:10px;flex:none;width:36px;height:20px;transition:background-color .14s;position:relative}.toggle-track:after{content:"";background:#fff;border-radius:50%;width:14px;height:14px;transition:transform .14s;position:absolute;top:3px;left:3px;box-shadow:0 1px 2px #0003}.toggle-row input:checked+.toggle-track{background:var(--accent)}.toggle-row input:checked+.toggle-track:after{transform:translate(16px)}.toggle-row input:focus-visible+.toggle-track{outline-offset:2px;outline:3px solid #397b9152}.workspace{background:#e9ede8;grid-area:workspace;min-width:0;min-height:0}.viewer-stage{width:100%;height:100%;min-height:320px;position:relative;overflow:hidden}.viewer-stage canvas{cursor:grab;touch-action:none;width:100%;height:100%;display:block;position:absolute;inset:0}.part-tooltip{z-index:7;width:max-content;min-width:166px;max-width:min(190px,100% - 20px);color:var(--text);opacity:0;pointer-events:none;visibility:hidden;background:#f7faf6f5;border:1px solid #1c2f2638;border-radius:6px;padding:8px 10px;transition:opacity 90ms;position:absolute;transform:translateY(calc(-100% - 10px));box-shadow:0 7px 20px #1c2f2624}.part-tooltip.is-visible{opacity:1;visibility:visible}.part-tooltip strong,.part-tooltip span{text-overflow:ellipsis;white-space:nowrap;display:block;overflow:hidden}.part-tooltip strong{margin-bottom:3px;font-size:12px}.part-tooltip span{color:var(--muted-strong);font-size:10px;line-height:1.45}.viewer-meta{z-index:5;pointer-events:none;justify-content:space-between;width:calc(100% - 28px);position:absolute;top:14px;left:14px}.viewer-meta>span:last-child{color:#59645d;font-variant-numeric:tabular-nums;font-size:11px}.status-chip{color:#3f4b43;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:#fafcf8db;border:1px solid #84958a73;border-radius:5px;gap:7px;min-height:28px;padding:0 9px;font-size:11px;font-weight:650}.status-dot{background:#3d9067;border-radius:50%;flex:none;width:7px;height:7px;display:inline-block;box-shadow:0 0 0 3px #3d906724}.viewer-toolbar{z-index:6;-webkit-backdrop-filter:blur(9px);backdrop-filter:blur(9px);background:#fafcf8e6;border:1px solid #84958a73;border-radius:7px;gap:6px;padding:5px;display:flex;position:absolute;bottom:14px;right:14px}.viewer-toolbar .icon-button{background:0 0;border-color:#0000;width:34px;height:34px}.viewer-toolbar .icon-button.is-active{background:var(--accent-soft)}.drop-overlay,.generation-overlay{z-index:10;color:var(--accent);opacity:0;pointer-events:none;background:#e9ede8e8;place-content:center;justify-items:center;gap:10px;transition:opacity .15s;display:grid;position:absolute;inset:0}.drop-overlay.is-visible,.generation-overlay.is-visible{opacity:1}.drop-overlay svg,.generation-overlay svg{width:32px;height:32px}.drop-overlay strong,.generation-overlay span{color:var(--text);font-size:13px;font-weight:700}.generation-overlay svg{animation:.9s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.metric-list{margin:0}.metric-list>div{grid-template-columns:minmax(0,1fr) minmax(95px,auto);align-items:baseline;gap:12px;min-height:35px;display:grid}.metric-list dt{color:var(--muted);font-size:12px}.metric-list dd{max-width:180px;color:var(--text);font-variant-numeric:tabular-nums;text-align:right;text-overflow:ellipsis;white-space:nowrap;margin:0;font-size:13px;font-weight:700;overflow:hidden}.metric-list dd[data-score=good]{color:var(--accent)}.metric-list dd[data-score=medium]{color:var(--amber)}.metric-list dd[data-score=low]{color:var(--danger)}.metric-list .cost-row{border-top:1px solid var(--line);min-height:43px;margin-top:5px;padding-top:8px}.metric-list .cost-row dd{color:var(--amber);font-size:15px}.kernel-metrics{border-top:1px solid var(--line);border-left:1px solid var(--line);grid-template-columns:repeat(2,minmax(0,1fr));margin:0;display:grid}.kernel-metrics>div{border-right:1px solid var(--line);border-bottom:1px solid var(--line);min-width:0;padding:9px 10px}.kernel-metrics dt,.kernel-metrics dd{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.kernel-metrics dt{color:var(--muted);margin-bottom:4px;font-size:10px}.kernel-metrics dd{color:var(--text);font-variant-numeric:tabular-nums;margin:0;font-size:14px;font-weight:750}#kernel-state[data-state=ready]{color:var(--accent)}#kernel-state[data-state=error]{color:var(--danger)}.parts-list{display:grid}.part-row{gap:9px;min-height:36px}.part-swatch{background:var(--swatch);border:1px solid #1e24202e;border-radius:4px;flex:none;width:17px;height:17px}.part-name{flex:auto;align-items:baseline;gap:7px;min-width:0;display:flex}.part-name b{flex:none;font-size:12px}.part-name small{color:var(--muted);text-overflow:ellipsis;white-space:nowrap;font-size:10px;overflow:hidden}.part-row>strong{color:var(--muted-strong);font-variant-numeric:tabular-nums;flex:none;font-size:12px}.parts-more{color:var(--muted);margin-top:6px;font-size:10px;line-height:1.45}.export-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;display:grid}.export-grid .button{white-space:normal;flex-direction:column;gap:4px;min-width:0;min-height:48px}.export-grid .button span{text-overflow:ellipsis;white-space:nowrap;max-width:100%;font-size:11px;overflow:hidden}.statusbar{z-index:20;border-top:1px solid var(--line);background:var(--surface);min-width:0;color:var(--muted);grid-area:status;justify-content:space-between;padding:0 12px;font-size:10px}.statusbar>span{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.statusbar>span:first-child{color:var(--muted-strong);flex:0 auto;align-items:center;gap:7px;margin-right:16px;display:flex}#status-message[data-tone=working] .status-dot{background:var(--blue);box-shadow:0 0 0 3px #397b9126}#status-message[data-tone=error] .status-dot{background:var(--danger);box-shadow:0 0 0 3px #a8443c26}@media (width<=1080px){.app-shell{grid-template-columns:254px minmax(360px,1fr) 274px}.panel-section{padding-left:13px;padding-right:13px}}@media (width<=820px){body{overflow:auto}.app-shell{grid-template-columns:minmax(0,1fr);grid-template-rows:var(--topbar-height) minmax(410px, 56dvh) auto auto var(--statusbar-height);grid-template-areas:"header""workspace""controls""inspector""status";height:auto;min-height:100dvh}.topbar{position:sticky;top:0}.project-name{max-width:120px}.control-panel,.inspector{border-left:0;border-right:0;overflow:visible}.workspace{border-bottom:1px solid var(--line);min-height:410px}.control-panel{grid-template-columns:repeat(2,minmax(0,1fr));display:grid}.control-panel .source-section{border-right:1px solid var(--line);grid-row:span 2}.inspector{border-top:1px solid var(--line);grid-template-columns:repeat(2,minmax(0,1fr));display:grid}.kernel-section{border-left:1px solid var(--line)}.parts-section,.export-section{grid-column:1/-1}.export-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.statusbar{position:static}}@media (width<=560px){:root{--topbar-height:54px}.topbar{padding-left:10px;padding-right:8px}.brand-lockup{gap:7px}.brand-mark{width:29px;height:29px}.project-name{display:none}.top-actions{gap:5px}.top-actions .button{min-height:34px;padding-left:10px;padding-right:10px}.app-shell{grid-template-rows:var(--topbar-height) minmax(380px, 54dvh) auto auto var(--statusbar-height)}.workspace{min-height:380px}.control-panel,.inspector{display:block}.control-panel .source-section,.kernel-section,.parts-section{border-left:0;border-right:0}.panel-section{padding:16px}.source-section{grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:12px;display:grid}.source-section .section-heading,.source-section .local-badge{grid-column:1/-1}.source-preview{grid-row:span 2;margin-bottom:0}.source-section .button{align-self:end}.export-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.viewer-meta{width:calc(100% - 20px);top:10px;left:10px}.viewer-toolbar{bottom:10px;right:10px}.statusbar>span:last-child{display:none}}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}
