*{box-sizing:border-box;margin:0;padding:0}:root{--bg:#353535;--side:#292929;--panel:#4b4b4b;--card:#3c3c3c;--field:#363636;--line:#565656;--fg:#f3f3f3;--muted:#bebebe;--dim:#858585;--cyan:#11d9e6;--blue:#4b7df8;--orange:#ffb300;--red:#ef6262}html,body{height:100%}body{background:var(--bg);color:var(--fg);font:13px/1.45 "Microsoft YaHei UI","PingFang SC",sans-serif;overflow:hidden;user-select:none}.hidden{display:none!important}.dim{color:var(--dim)}button,input,select,textarea{font:inherit}button{cursor:pointer}#app{height:100vh;display:flex}
#login-view{flex:1;display:flex;align-items:center;justify-content:center;background:linear-gradient(145deg,#272727,#3c4658)}.login-box{width:82%;max-width:290px;text-align:center}.login-logo{width:62px;height:62px;margin:0 auto 13px;border-radius:15px;line-height:62px;font-size:29px;font-weight:800;background:linear-gradient(135deg,var(--cyan),var(--blue))}.login-title{font-size:20px;font-weight:700}.login-sub,.login-hint{color:var(--muted);font-size:12px}.login-sub{margin:4px 0 24px}.login-hint{margin-top:13px}#key-input{width:100%;padding:11px;border:1px solid var(--line);border-radius:6px;background:var(--field);color:#fff;text-align:center;outline:0;margin-bottom:11px}#key-input:focus{border-color:var(--cyan)}
.cta{border:0;border-radius:22px;padding:11px 18px;color:#fff;font-weight:700;background:linear-gradient(90deg,#0fd7df,#4b79fa);box-shadow:0 3px 10px rgba(17,217,230,.16)}.cta:disabled{opacity:.5;cursor:default}#main-view{flex:1;display:flex;min-width:0}#side{width:40px;flex:0 0 40px;background:var(--side);border-right:1px solid #202020;display:flex;flex-direction:column;align-items:center;padding-top:7px}.side-logo{width:30px;height:30px;border-radius:5px;line-height:30px;text-align:center;background:linear-gradient(135deg,var(--cyan),var(--blue));font-weight:800;margin-bottom:10px}.side-btn{width:32px;height:36px;border:0;background:transparent;color:#ddd;font-size:17px;border-radius:4px;margin:1px 0}.side-btn:hover,.side-btn.on{background:#4b4b4b;color:#fff}.side-version{margin-top:auto;margin-bottom:7px;color:#6d6d6d;font-size:9px;writing-mode:vertical-rl}#content{flex:1;display:flex;min-width:0}.view{display:none;flex:1;flex-direction:column;min-height:0}.view.on{display:flex}
#uhead,#uhead2,#uhead3{height:36px;flex:0 0 36px;display:flex;align-items:center;justify-content:space-between;padding:0 10px;background:#444;border-bottom:1px solid #5b5b5b}.user-line{display:flex;align-items:center;gap:6px;min-width:0}.user-icon{font-size:16px}.user-line b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#uhead-quota{font-size:11px;color:#e7e7e7}.panel-title{height:33px;display:flex;align-items:center;gap:5px;padding:0 10px;background:#505050;border-bottom:1px solid #3c3c3c}.panel-title span{font-size:11px;color:#c8c8c8}#tool-switch{padding:5px 8px;background:#505050}.tool-tab{width:100%;height:38px;display:none;align-items:center;justify-content:flex-start;gap:8px;padding:0 12px;border:0;border-radius:4px;background:#3d3d3d;color:#fff;font-size:14px}.tool-tab.on{display:flex}.tool-tab .t-ico{color:#f4a900}.tool-tab:after{content:"⌄";margin-left:auto;font-size:18px}.tool-menu-open .tool-tab{display:flex;border-radius:0}.tool-menu-open .tool-tab.on{background:#303030}.tool-menu-open .tool-tab:first-child{border-radius:4px 4px 0 0}.tool-menu-open .tool-tab:last-child{border-radius:0 0 4px 4px}
#main-scroll{flex:1;overflow:auto;min-height:0;background:#4b4b4b}#main-scroll::-webkit-scrollbar{width:5px}#main-scroll::-webkit-scrollbar-thumb{background:#747474}.block{border-bottom:1px solid #303030;padding:8px 10px}.sec-title{font-weight:700;font-size:14px;margin-bottom:6px}.sec-sub{font-size:10px;font-weight:400;color:#aaa}.chevron{float:right;font-size:17px}#img-drop{position:relative;min-height:66px;padding:5px;background:#3c3c3c;border:1px solid transparent;border-radius:4px;transition:.15s}#img-drop.drag{border-color:var(--cyan);background:#343f40}.drop-hint{position:absolute;right:8px;bottom:5px;color:#797979;font-size:10px;pointer-events:none}#img-row{display:flex;flex-wrap:wrap;gap:5px;min-height:54px}.img-cell,.img-add{width:54px;height:54px;border-radius:4px}.img-cell{position:relative;overflow:hidden;background:#282828;border:1px solid #666}.img-cell img{width:100%;height:100%;object-fit:cover}.img-cell .del{position:absolute;right:2px;top:2px;width:16px;height:16px;border-radius:50%;background:rgba(0,0,0,.75);line-height:16px;text-align:center;font-size:10px}.img-cell.stick:after{content:"选区";position:absolute;left:0;right:0;bottom:0;text-align:center;background:rgba(17,217,230,.8);font-size:9px;color:#111}.img-add{border:1px dashed #646464;background:#414141;color:#777;font-size:29px}.img-add:hover{color:var(--cyan);border-color:var(--cyan)}
.prompt-block{padding-bottom:9px}#prompt-input{display:block;width:100%;height:145px;resize:vertical;min-height:90px;max-height:260px;padding:12px 10px 32px;background:var(--field);color:#eee;border:0;border-radius:4px;outline:0;line-height:1.65}#prompt-input:focus{box-shadow:inset 0 0 0 1px #6a6a6a}.prompt-tools{height:27px;margin-top:-28px;padding:0 7px;position:relative;display:flex;align-items:center;justify-content:flex-end;gap:7px;color:#8b8b8b}.prompt-tools>span{margin-right:auto;font-size:10px}.icon-btn{width:24px;height:22px;background:transparent;border:0;color:#aaa;font-size:16px}.icon-btn:hover{color:#fff}
.param-list{border-top:1px solid #5d5d5d}.p-row{min-height:39px;display:flex;align-items:center;padding:4px 10px;border-bottom:1px solid #333;background:#505050}.p-label{font-weight:600;font-size:13px;flex:1}.p-label small{font-weight:400;color:#bbb}#params select{width:126px;height:30px;border:0;border-radius:4px;padding:0 28px 0 10px;background:#3d3d3d;color:#fff;outline:0}.switch{width:34px;height:19px;border:0;border-radius:20px;background:#777;position:relative}.switch i{position:absolute;top:2px;left:2px;width:15px;height:15px;border-radius:50%;background:#fff;transition:.15s}.switch.on{background:var(--cyan)}.switch.on i{left:17px}
.result-block{min-height:185px}.result-empty{width:164px;height:132px;background:#3c3c3c;display:flex;align-items:center;justify-content:center;flex-direction:column;color:#ddd;gap:8px}.result-empty span{font-size:25px}.result-empty small{color:#888}#result-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.res-cell{position:relative;height:135px;overflow:hidden;background:#292929;border-radius:4px}.res-cell img{width:100%;height:100%;object-fit:contain}.res-cell .ins{position:absolute;left:7px;right:7px;bottom:6px;border:0;border-radius:4px;padding:5px;color:white;background:linear-gradient(90deg,#14cad9,#4e75f5)}#progress-box{padding:12px 2px}.bar{height:5px;background:#303030;border-radius:5px;overflow:hidden;margin:8px 0}#progress-fill{height:100%;width:2%;background:linear-gradient(90deg,var(--cyan),var(--blue));transition:.3s}.mini-btn{padding:5px 10px;border:1px solid #666;border-radius:4px;background:#414141;color:#ddd}.mini-btn.primary{border-color:var(--cyan)}.mini-btn.danger{color:#ff8c8c}.mini-btn.wide{width:calc(100% - 20px);margin:16px 10px;padding:9px}
#foot{flex:0 0 auto;padding:8px 10px 9px;background:#454545;border-top:1px solid #606060}#foot>div{display:flex;align-items:center;gap:5px;margin-bottom:7px;color:#eee}.coin{color:var(--orange);font-size:10px}#btn-gen{width:100%;font-size:14px;padding:10px}
#history-list{flex:1;overflow:auto;padding:10px}.hist-item{display:flex;gap:9px;padding:8px;margin-bottom:6px;background:#3c3c3c;border-radius:5px}.hist-item img{width:48px;height:48px;object-fit:cover;background:#222}.h-info{min-width:0}.h-tool{font-weight:600}.h-prompt{font-size:11px;color:#aaa;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hist-empty{text-align:center;color:#999;padding-top:50px}.acc-card{margin:12px 10px;background:#404040;padding:4px 10px}.acc-row{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #555}.about-box{margin:18px 10px;line-height:1.9}
#pop-mask{position:fixed;inset:0;background:rgba(0,0,0,.48);z-index:40}.pop{position:fixed;z-index:50;left:50%;top:50%;transform:translate(-50%,-50%);background:#414141;border:1px solid #777;box-shadow:0 8px 25px rgba(0,0,0,.45);border-radius:5px;padding:5px;min-width:150px}.pop-item{display:block;width:100%;border:0;background:transparent;color:#fff;text-align:left;padding:10px 14px}.pop-item:hover{background:#555}.imgpop{width:92%;max-width:360px}.imgpop img{display:block;max-width:100%;max-height:62vh;margin:auto}.imgpop-bar{display:flex;justify-content:center;gap:8px;margin-top:7px}.promptpop{width:92%;padding:10px}.pop-head{display:flex;justify-content:space-between;font-weight:700;margin-bottom:8px}.pop-head button{border:0;background:transparent;color:#fff;font-size:20px}.promptpop textarea{width:100%;height:48vh;resize:none;background:#303030;color:#fff;border:1px solid #666;padding:10px;outline:0;margin-bottom:8px}.promptpop .cta{width:100%}#toast{position:fixed;z-index:99;left:50%;bottom:68px;transform:translateX(-50%);max-width:86%;padding:8px 13px;border-radius:5px;background:rgba(18,18,18,.94);color:#fff;text-align:center;opacity:0;pointer-events:none;transition:.2s}#toast.show{opacity:1}
@media(max-width:270px){#side{width:35px;flex-basis:35px}.p-label{font-size:12px}#params select{width:110px}.result-empty{width:130px}}
