:root{color-scheme:light;--bg:#f0f1ed;--input:#e8ebe5;--paper:#fff;--ink:#181d19;--muted:#677167;--line:#dce1d8;--orange:#ce4126;--orange-light:#fae0d7;--error:#ad2a25;--focus:#356551;font-family:Inter,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;font-size:15px}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);line-height:1.55}[hidden]{display:none!important}button,input,select,textarea{font:inherit}button{cursor:pointer;border:1px solid var(--line);border-radius:10px;padding:9px 13px;min-height:44px;background:var(--paper);color:var(--ink);transition:background .15s,border-color .15s}button:hover:not(:disabled){background:#f5f7f2;border-color:#afb8ac}button:active:not(:disabled){background:#e5eadf}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid var(--focus);outline-offset:3px}button.primary{background:var(--orange);color:white;border-color:var(--orange);font-weight:650}button.primary:hover:not(:disabled){background:#ad341d}button.danger{color:var(--error)}h1,h2,h3,p{margin:0}h2{font-size:18px}h3{font-size:17px}input:not([type=range]),select,textarea{width:100%;background:white;border:1px solid var(--line);border-radius:10px;padding:10px 12px;min-height:44px;color:var(--ink)}input[type=range]{accent-color:var(--orange);width:100%;min-height:24px}textarea{resize:vertical;min-height:120px;line-height:1.65}textarea::placeholder{color:#727d74}label{display:block}.hint{font-size:12px;color:var(--muted);line-height:1.6}.error,.hint.invalid{color:var(--error)}
.brandbar{height:54px;padding:0 28px;display:flex;align-items:center;gap:13px;border-bottom:1px solid var(--line);background:#fbfcf9}.brandbar strong{font-size:16px}.brand-mark{width:20px;height:17px;border:2px solid #818980;border-radius:5px;position:relative}.brand-mark:before{content:"";position:absolute;top:2px;bottom:2px;left:3px;border-left:2px solid #818980}.brand-note{margin-left:auto;font-size:10px;letter-spacing:2px;color:var(--muted)}main{max-width:1920px;margin:auto;padding:32px 28px}.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:26px}h1{font-size:clamp(25px,2.5vw,44px);line-height:1.25;letter-spacing:-1.4px;font-weight:750}.page-heading p{margin-top:10px;color:var(--muted)}.account-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;flex-shrink:0}.connection{font-size:12px;color:var(--muted);white-space:nowrap}.connection.connected:before{content:"";display:inline-block;width:8px;height:8px;border-radius:50%;background:#2d9970;margin-right:7px;box-shadow:0 0 0 4px #d6ece1}#account{display:inline-flex;align-items:center;gap:10px;background:white;padding:4px 6px 4px 13px;border:1px solid var(--line);border-radius:12px}#username{font-size:13px}
.workspace{display:grid;grid-template-columns:minmax(340px,40%) minmax(0,1fr);border:1px solid var(--line);border-radius:24px;overflow:hidden;background:white;min-height:calc(100vh - 210px)}.workspace.with-history{grid-template-columns:minmax(330px,34%) minmax(0,1fr) minmax(240px,23%)}.input-panel{background:var(--input);padding:26px 24px;border-right:1px solid var(--line)}.step{margin-bottom:22px}.step h2{display:flex;justify-content:space-between;align-items:center;color:#515e53;font-size:13px;font-weight:600;margin-bottom:12px}.step h2 span{color:#7c897d;font-variant-numeric:tabular-nums}.image-slot{height:140px;position:relative;border:1px dashed #b9c3b7;border-radius:14px;background:white;overflow:hidden;transition:border-color .15s}.image-slot.dragover{border:2px solid var(--orange)}.image-slot button.upload{width:100%;height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px;border:0;background:transparent;font-size:12px;border-radius:12px;padding:12px;color:#4c594e}.upload-plus{font-size:25px;line-height:1;font-weight:300}.base-slot{height:230px;background:transparent;border-color:transparent}.base-slot button.upload{font-size:15px}.base-slot .upload-plus{display:flex;align-items:center;justify-content:center;width:46px;height:46px;border-radius:50%;background:var(--orange-light);color:var(--orange);font-size:30px;margin-bottom:4px}.base-slot small{font-size:12px;color:var(--muted);text-align:center}.image-slot img{width:100%;height:100%;object-fit:contain;background:#dce2d8}.image-slot .remove-image,.image-slot .edit-image{position:absolute;right:5px;min-height:36px;min-width:36px;padding:5px 9px;background:#fffffff0}.image-slot .remove-image{top:5px;font-size:20px}.image-slot .edit-image{bottom:5px;font-size:12px}.ref-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.segmented{display:flex;gap:8px;margin-bottom:16px}.segmented button{flex:1;color:var(--muted);font-size:13px}.segmented button.selected{background:var(--orange-light);border-color:#eb9c86;color:#a73420;font-weight:650}.params{display:grid;grid-template-columns:1fr 1fr;gap:12px}.params label{font-size:12px;color:#526054}.params select{margin-top:5px;font-size:14px}.creativity-label{display:grid;grid-template-columns:1fr auto;align-items:center;gap:6px;background:white;padding:11px 13px;border-radius:12px;margin-top:14px;font-size:12px;font-weight:600}.creativity-label output{color:var(--orange);font-size:14px}.creativity-label input{grid-column:1/-1}.intent-box{position:relative}.intent-box textarea{padding-bottom:28px}.intent-box>span{position:absolute;bottom:9px;right:13px;font-size:11px;color:var(--muted);pointer-events:none}#intent-help{margin-top:7px}.forge-button{width:100%;font-size:15px;min-height:52px}#session-note{text-align:center;margin-top:9px}
.output-panel{padding:26px;min-width:0;display:flex;flex-direction:column}.output-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;border-bottom:1px solid var(--line);padding-bottom:20px}.output-heading p{font-size:12px;color:var(--muted);margin-top:5px}.output-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.output-actions button{font-size:12px;padding:8px 10px}.tags{display:flex;gap:7px;flex-wrap:wrap;margin:18px 0 0}.tags span{font-size:11px;background:#f3f5f0;border:1px solid var(--line);padding:4px 9px;border-radius:99px}#result-content{flex:1;display:flex;flex-direction:column;min-height:500px}.empty-result{margin:auto;text-align:center;max-width:470px;padding:60px 20px}.empty-result p{font-size:14px;color:var(--muted);margin-top:12px;line-height:1.8}.pen-symbol{width:88px;height:88px;display:block;margin:0 auto 25px;border:1px solid var(--line);border-radius:50%;position:relative}.pen-symbol:before{content:"";position:absolute;inset:15px;border:1px solid #ed9c86;border-radius:50%}.pen-symbol:after{content:"";position:absolute;width:47px;height:3px;background:var(--orange);top:42px;left:20px;transform:rotate(-48deg)}.flow-labels{font-size:11px;color:var(--muted);margin-top:20px}.flow-labels span{padding:0 5px;color:#a8b1a3}.prompt-section{padding:25px 0;border-bottom:1px solid var(--line)}.prompt-section:last-child{border-bottom:0}.prompt-section h3{font-size:15px;display:flex;gap:11px;align-items:center}.prompt-section h3 span{font-size:12px;font-weight:500;color:var(--orange)}.prompt-section p,.raw-result{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.85;margin-top:12px;font-size:15px}.raw-result{font-family:inherit;margin:25px 0}.result-error{margin:40px 0;padding:22px;border:1px solid #e9bdb6;background:#fff5f1;border-radius:14px}.result-error p{margin-top:10px;color:var(--error);overflow-wrap:anywhere}.loading-result{margin:auto;text-align:center;color:var(--muted)}.spinner{display:block;width:30px;height:30px;border:2px solid var(--line);border-top-color:var(--orange);border-radius:50%;animation:spin .9s linear infinite;margin:0 auto 18px}@keyframes spin{to{transform:rotate(360deg)}}
.gallery{padding:24px 18px;background:#f8f9f5;border-left:1px solid var(--line);min-width:0}.gallery header{display:flex;justify-content:space-between;align-items:center;gap:8px}.gallery h2{font-size:16px}#history-status{margin:10px 0 15px}.history-card{position:relative;background:white;border:1px solid var(--line);border-radius:12px;overflow:hidden;margin-top:12px}.history-open{display:block;width:100%;text-align:left;padding:0;border:0;border-radius:0;min-height:100px}.history-open img{width:100%;height:125px;display:block;object-fit:cover}.history-card-text{padding:12px}.history-card-text p{font-size:13px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;padding-right:22px}.history-card time{font-size:11px;color:var(--muted);display:block;margin-top:5px}.star-button{position:absolute;right:4px;bottom:26px;min-width:44px;min-height:44px;border:0;padding:5px;font-size:20px;background:white;color:#b34327}.gallery-empty{font-size:13px;color:var(--muted);padding:30px 0;text-align:center;white-space:pre-line}
dialog{border:1px solid var(--line);border-radius:20px;background:white;color:var(--ink);padding:24px;max-height:90dvh;max-width:calc(100vw - 24px);box-shadow:0 30px 90px #14241630}dialog::backdrop{background:#101a1599;backdrop-filter:blur(5px)}dialog header,dialog footer{display:flex;justify-content:space-between;align-items:center;gap:12px}dialog header button{font-size:22px;min-width:44px;padding:3px}dialog footer{margin-top:22px;flex-wrap:wrap}dialog footer>div{display:flex;gap:9px}.login-dialog{width:380px}.login-dialog label{margin-top:17px;font-size:13px}.login-dialog input{margin-top:5px}.login-dialog .hint{margin-top:10px}.login-dialog .primary{width:100%;margin-top:15px}.login-dialog .error{margin-top:12px;font-size:13px}.detail-dialog{width:760px}.detail-images{display:flex;gap:10px;overflow:auto;margin:20px 0}.detail-images img{max-height:330px;max-width:100%;object-fit:contain;border-radius:10px}.detail-dialog h3{font-size:14px;margin:17px 0 8px;color:var(--muted)}.detail-dialog pre,.detail-dialog #detail-intent{white-space:pre-wrap;font-family:inherit;overflow-wrap:anywhere;font-size:14px;line-height:1.8}.confirm-dialog{width:380px}.confirm-dialog p{color:var(--muted);margin-top:10px}
.editor-dialog{width:min(1400px,94vw);padding:0;overflow:auto}.editor-dialog>header{padding:19px 22px;background:white}.editor-dialog header p{font-size:12px;color:var(--muted);margin-top:4px}.editor-zoom{display:flex;align-items:center;gap:12px}.editor-zoom output{color:var(--orange);font-weight:600}.editor-stage{height:clamp(260px,62vh,730px);background:#111713;position:relative;overflow:hidden;touch-action:none;user-select:none}.editor-stage.pan{cursor:grab}.editor-stage.panning{cursor:grabbing}#editor-layers{position:absolute;top:0;left:0;transform-origin:0 0}#editor-layers canvas{position:absolute;inset:0;display:block}#annotation-canvas{cursor:crosshair}.stage-hint{position:absolute;left:14px;bottom:12px;color:#ddd;background:#090d0bad;border-radius:6px;padding:6px 9px;font-size:11px;pointer-events:none}.editor-toolbar{background:#19201b;color:white;padding:12px 14px;display:flex;flex-wrap:wrap;align-items:center;gap:12px}.tool-group,.color-group{display:flex;flex-wrap:wrap;align-items:center;gap:5px}.editor-toolbar button{background:#19201b;border-color:#444d45;color:#eee;font-size:12px;padding:8px}.editor-toolbar button:hover:not(:disabled){background:#333e34}.editor-toolbar button.selected{background:#573a2d;border-color:#ef8059}.color-group button{width:38px;height:38px;min-height:38px;border-radius:50%;background:var(--swatch);border:3px solid #19201b;outline:1px solid #5b655d}.color-group button:hover:not(:disabled){background:var(--swatch)}.color-group button.selected{outline:2px solid white;background:var(--swatch)}.width-control{display:flex;align-items:center;gap:8px;font-size:12px}.width-control input{width:100px}.width-control output{width:20px}#annotation-text-label{font-size:12px}#annotation-text{width:180px;min-height:38px;font-size:12px}.editor-dialog>footer{margin:0;padding:14px 18px;background:white}.notice{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#233128;color:white;padding:12px 20px;border-radius:12px;max-width:calc(100vw - 24px);font-size:13px;z-index:1000;box-shadow:0 10px 30px #0002}
@media(min-width:1700px){.base-slot{height:270px}.image-slot:not(.base-slot){height:165px}.input-panel{padding:30px}.output-panel{padding:30px}}@media(max-width:1250px){.page-heading{align-items:flex-start;flex-direction:column;gap:16px}.account-actions{justify-content:flex-start}.workspace.with-history{grid-template-columns:minmax(330px,40%) minmax(0,1fr)}.workspace.with-history .gallery{grid-column:1/-1;border-left:0;border-top:1px solid var(--line)}.workspace.with-history #history-items{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.output-heading{flex-direction:column}}@media(max-width:760px){main{padding:24px 12px}.brandbar{padding:0 16px}.brand-note{display:none}h1{font-size:29px;letter-spacing:-.8px}.page-heading p{font-size:13px}.workspace,.workspace.with-history{grid-template-columns:1fr;border-radius:18px}.input-panel{border-right:0;border-bottom:1px solid var(--line);padding:21px 18px}.output-panel{padding:22px 18px}.base-slot{height:190px}.ref-grid{gap:8px}.image-slot{height:125px}.output-heading{flex-direction:row;flex-wrap:wrap}.workspace.with-history #history-items{grid-template-columns:repeat(2,minmax(0,1fr))}.connection{width:100%}.editor-dialog{width:calc(100vw - 24px);max-width:calc(100vw - 24px)}.editor-stage{height:50dvh}.editor-dialog>header{padding:14px}.editor-dialog>footer{padding:12px;gap:8px}.editor-dialog footer button{font-size:12px;padding:8px}.editor-toolbar{gap:10px}.stage-hint{font-size:10px}.flow-labels{font-size:10px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
.editor-dialog[open]{display:flex;flex-direction:column;height:min(900px,94dvh);max-height:94dvh}.editor-dialog>header,.editor-dialog>footer,.editor-toolbar{flex-shrink:0}.editor-dialog .editor-stage{height:auto;flex:1;min-height:160px}.color-group button{width:44px;height:44px;min-height:44px}.image-slot .remove-image,.image-slot .edit-image{min-height:44px;min-width:44px}.gallery-empty{min-height:300px;display:flex;align-items:center;justify-content:center}
@media(min-width:1251px){.workspace.with-history{border:0;border-radius:0;background:transparent;overflow:visible}.workspace.with-history .input-panel{border:1px solid var(--line);border-right:0;border-radius:24px 0 0 24px}.workspace.with-history .output-panel{border:1px solid var(--line);border-left:0;border-radius:0 24px 24px 0}.workspace.with-history .gallery{border:1px solid var(--line);border-radius:24px;margin-left:16px;align-self:start;min-height:600px;max-height:85vh;overflow:auto;background:white}}
