*{box-sizing:border-box}:root{color:#172019;background:#f6f4ef;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-synthesis:none;text-rendering:geometricPrecision;-webkit-font-smoothing:antialiased}body{margin:0;min-width:320px;min-height:100vh;background:linear-gradient(180deg,#ffffffd6,#f6f4eff5),#f6f4ef}button,input,textarea,select{font:inherit}button{cursor:pointer}.auth-shell,.loading-page{min-height:100vh;display:grid;place-items:center;padding:24px}.auth-panel{width:min(420px,100%);border:1px solid #d9d5c9;background:#fffdfa;border-radius:8px;padding:28px;box-shadow:0 20px 50px #17201914}.brand-mark{width:38px;height:38px;display:grid;place-items:center;color:#fffdfa;background:#1f7a63;border-radius:8px}h1,h2,p{margin:0}.auth-panel h1{margin-top:16px;font-size:30px;line-height:1.1}.auth-form{display:grid;gap:14px;margin-top:28px}label,.field{display:grid;gap:8px;color:#3f4a43;font-size:14px;font-weight:650}input,textarea,select{width:100%;border:1px solid #d6d0c3;border-radius:8px;background:#fffdfa;color:#172019;outline:none}input,select{height:44px;padding:0 12px}textarea{min-height:178px;resize:vertical;padding:12px;line-height:1.55}input:focus,textarea:focus,select:focus{border-color:#1f7a63;box-shadow:0 0 0 3px #1f7a6326}.primary-btn,.ghost-btn,.text-btn,.icon-btn,.download-btn{border:0;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;border-radius:8px;text-decoration:none;white-space:nowrap}.primary-btn{color:#fffdfa;background:#1f7a63;padding:0 16px;font-weight:750}.primary-btn:disabled{cursor:not-allowed;opacity:.62}.ghost-btn{color:#172019;background:#fffdfa;border:1px solid #d9d5c9;padding:0 14px;font-weight:700}.text-btn{color:#1f7a63;background:transparent;margin-top:16px;padding:0}.icon-btn{width:42px;color:#172019;background:#fffdfa;border:1px solid #d9d5c9;font-size:22px}.error{color:#b42318;background:#fff2ef;border:1px solid #ffd1c9;border-radius:8px;padding:10px 12px;font-size:14px}.success-note{color:#195a49;background:#edf7f0;border:1px solid #cbe3d4;border-radius:8px;padding:10px 12px;font-size:14px}.spin{animation:spin .9s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.app-shell{min-height:100vh;display:grid;grid-template-rows:auto 1fr}.topbar{height:72px;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:0 24px;border-bottom:1px solid #dfd9cc;background:#fffdfadb;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);position:sticky;top:0;z-index:5}.brand,.top-actions,.balance{display:flex;align-items:center}.brand{gap:10px;font-weight:820;font-size:18px}.top-actions{gap:10px}.balance{min-height:42px;gap:8px;padding:0 14px;background:#edf7f0;color:#195a49;border:1px solid #cbe3d4;border-radius:8px;font-weight:760}.workspace{display:grid;grid-template-columns:minmax(280px,350px) minmax(360px,1fr) minmax(280px,350px);gap:18px;padding:18px;min-height:calc(100vh - 72px)}.left-pane,.right-pane,.canvas-pane{border:1px solid #dfd9cc;background:#fffdfadb;border-radius:8px}.left-pane,.right-pane{padding:18px;display:flex;flex-direction:column;gap:16px}.canvas-pane{display:block;overflow:hidden;min-height:560px;padding:18px}.section-title{display:flex;align-items:center;gap:8px}.section-title h2,.model-panel h2,.history-panel h2,.modal h2{font-size:18px}.segmented{display:grid;grid-template-columns:repeat(auto-fit,minmax(72px,1fr));gap:6px;padding:4px;border:1px solid #d9d5c9;border-radius:8px;background:#f3efe5}.mode-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:4px;border:1px solid #d9d5c9;border-radius:8px;background:#f3efe5}.mode-tabs button{border:0;min-height:38px;border-radius:6px;color:#455048;background:transparent;font-weight:760}.mode-tabs button.active{color:#172019;background:#fffdfa;box-shadow:0 1px 8px #17201914}.hidden-file{display:none}.reference-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;border-radius:8px}.reference-grid.dragging{outline:2px solid rgba(31,122,99,.42);outline-offset:4px}.reference-slot{position:relative;aspect-ratio:1;border:1px dashed #cfc7b8;border-radius:8px;background:#fffdfa;overflow:hidden;padding:0}.reference-slot.filled{border-style:solid}.reference-slot:hover,.reference-grid.dragging .reference-slot{border-color:#1f7a63;background:#f1faf5}.reference-slot img{width:100%;height:100%;object-fit:cover;display:block}.reference-label{position:absolute;left:6px;top:6px;z-index:2;color:#172019;background:#fffdfae6;border:1px solid #e4dccf;border-radius:999px;padding:2px 7px;font-size:12px;font-weight:760}.reference-empty{height:100%;display:grid;place-items:center;color:#7a847c}.remove-reference{position:absolute;right:5px;top:5px;z-index:3;width:22px;height:22px;display:grid;place-items:center;border-radius:999px;color:#172019;background:#fffdfaf0;border:1px solid #e4dccf;font-size:16px;font-weight:800}.ratio-select-wrap{position:relative}.ratio-select{width:100%;min-height:42px;border:1px solid #d9d5c9;border-radius:8px;background:#fffdfa;color:#172019;text-align:left;padding:0 12px;font-weight:760}.ratio-menu{position:absolute;z-index:6;left:0;right:0;top:calc(100% + 6px);display:grid;gap:2px;max-height:292px;overflow:auto;padding:6px;border:1px solid #d9d5c9;border-radius:8px;background:#fffdfa;box-shadow:0 18px 44px #17201924}.ratio-menu button{border:0;min-height:34px;border-radius:6px;color:#455048;background:transparent;text-align:left;padding:0 10px;font-weight:720}.ratio-menu button.active{color:#6d28d9;background:#f2eaff}.segmented button,.channel-row button{border:0;min-height:36px;border-radius:6px;color:#455048;background:transparent;font-weight:720}.segmented button.active,.channel-row button.active{color:#172019;background:#fffdfa;box-shadow:0 1px 8px #17201914}.segmented button:disabled{cursor:not-allowed;color:#a7aaa5;background:#ebe7de;box-shadow:none;opacity:.72}.resolution-hint{margin-top:-6px;color:#66736b;font-size:12px;line-height:1.45}.cost-row,.price-line,.payment-line,.status-strip,.history-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.cost-row{padding:12px;border-radius:8px;background:#fff4dd;color:#4f3510}.generate-btn{min-height:48px}.preview-wrap{width:100%;height:100%;display:grid;place-items:center;position:relative}.task-board{width:100%;height:100%;display:grid;grid-template-rows:auto 1fr;gap:14px;align-content:start}.task-board-head{display:flex;align-items:center;justify-content:space-between}.task-board-head h2{font-size:18px}.task-list{display:grid;gap:12px;align-content:start;max-height:calc(100vh - 150px);overflow:auto;padding-right:4px}.task-card{display:grid;gap:10px;padding:14px;border:1px solid #dfd9cc;border-radius:8px;background:#fffdfa}.task-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.task-card-head div{display:grid;gap:3px}.task-card-head strong{font-size:16px}.task-card-head span,.task-card-head em{color:#657069;font-size:13px;font-style:normal}.task-card.running .task-card-head em{color:#1f7a63;font-weight:760}.task-card.failed .task-card-head em,.task-card.partial .task-card-head em{color:#b42318;font-weight:760}.task-progress{height:8px;overflow:hidden;border-radius:999px;background:#eee7db}.task-progress span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#1f7a63,#2aa986,#1f7a63),#1f7a63;background-size:180% 100%;transition:width .5s ease}.task-card.running .task-progress span{animation:progress-flow 1.2s linear infinite}@keyframes progress-flow{0%{background-position:180% 0}to{background-position:0 0}}.task-prompt{color:#3f4a43;font-size:13px;line-height:1.45}.task-result-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,240px));gap:10px;align-items:start;justify-content:start}.task-result{border:1px solid #dfd9cc;border-radius:8px;background:#f8f5ed;padding:0;aspect-ratio:1;overflow:hidden}.task-result img{width:100%;height:100%;display:block;object-fit:cover}.task-errors{display:grid;gap:6px}.task-errors span{color:#b42318;background:#fff2ef;border:1px solid #ffd1c9;border-radius:8px;padding:8px 10px;font-size:13px}.task-empty{height:100%;min-height:420px;display:grid;place-content:center;justify-items:center;gap:12px;color:#718075;font-weight:760}.preview-wrap img{max-width:100%;max-height:calc(100vh - 150px);object-fit:contain;border-radius:8px;box-shadow:0 24px 70px #1720192e}.download-btn{position:absolute;right:18px;bottom:18px;padding:0 14px;color:#172019;background:#fffdfa;border:1px solid #d9d5c9;font-weight:750}.empty-preview{display:grid;justify-items:center;gap:12px;color:#718075;font-weight:760}.status-strip{padding:10px 12px;border-radius:8px;color:#17473d;background:#e9f7ef;border:1px solid #cbe3d4;font-weight:760}.status-strip em,.payment-line em,.upstream-box em,.package-card em{font-style:normal;font-size:12px}.model-panel,.price-panel,.history-panel{display:grid;gap:10px}.model-select-label{display:grid;gap:8px;color:#172019;font-size:18px;font-weight:820}.model-select-label select,.history-head select{font-weight:760}.history-head h2{flex:1}.history-head select{width:132px;height:38px}.upstream-box{display:grid;gap:6px;padding:10px 12px;border-radius:8px;border:1px solid #dfd9cc;background:#fffdfa}.upstream-box span{overflow-wrap:anywhere;color:#3f4a43;font-size:13px}.upstream-box em{color:#195a49}.price-line,.payment-line{padding:10px 0;border-bottom:1px solid #eee7db}.thumb-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.thumb{border:1px solid #dfd9cc;border-radius:8px;background:#f8f5ed;padding:0;aspect-ratio:1;overflow:hidden;position:relative}.delete-thumb{position:absolute;right:5px;top:5px;z-index:4;width:23px;height:23px;display:grid;place-items:center;border:1px solid rgba(23,32,25,.16);border-radius:999px;color:#172019;background:#fffdfaf0;font-size:16px;font-weight:850;line-height:1}.thumb img{width:100%;height:100%;object-fit:cover;display:block}.thumb-overlay{position:absolute;inset:auto 0 0;display:grid;gap:7px;padding:8px;color:#fffdfa;background:linear-gradient(180deg,#17201900,#172019e0 18%);transform:translateY(100%);transition:transform .18s ease}.thumb:hover .thumb-overlay,.thumb:focus-within .thumb-overlay{transform:translateY(0)}.thumb-overlay p{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-size:12px;line-height:1.35}.thumb-overlay button{justify-self:start;display:inline-flex;align-items:center;gap:4px;min-height:26px;border:0;border-radius:6px;color:#172019;background:#fffdfa;padding:0 8px;font-size:12px;font-weight:760}.image-modal-backdrop{position:fixed;inset:0;z-index:30;display:grid;place-items:center;padding:18px;background:#17201994}.image-modal{width:min(1100px,100%);max-height:calc(100vh - 36px);display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:12px;overflow:hidden;padding:14px;border:1px solid #d9d5c9;border-radius:8px;background:#fffdfa;box-shadow:0 28px 90px #17201947}.image-modal-head,.image-modal-foot{display:flex;align-items:center;justify-content:space-between;gap:12px}.image-modal-head strong{font-size:18px}.image-modal-actions{display:flex;align-items:center;gap:10px}.image-modal-figure{min-height:0;display:grid;place-items:center;overflow:hidden;border-radius:8px;background:#f8f5ed}.image-modal-figure img{max-width:100%;max-height:calc(100vh - 190px);display:block;object-fit:contain}.image-modal-foot p{color:#3f4a43;font-size:14px;line-height:1.45;overflow-wrap:anywhere}.image-context-menu{position:fixed;z-index:40;width:168px;display:grid;gap:4px;padding:6px;border:1px solid #d9d5c9;border-radius:8px;background:#fffdfa;box-shadow:0 16px 38px #1720192e}.image-context-menu button{border:0;min-height:34px;display:flex;align-items:center;gap:8px;border-radius:6px;color:#172019;background:transparent;padding:0 8px;text-align:left;font-weight:720}.image-context-menu button:hover{background:#f3efe5}.muted{color:#748078;font-size:14px}.modal-backdrop{position:fixed;inset:0;background:#17201975;display:grid;place-items:center;padding:18px;z-index:20}.modal{width:min(620px,100%);max-height:calc(100vh - 36px);overflow:auto;background:#fffdfa;border:1px solid #d9d5c9;border-radius:8px;padding:20px;display:grid;gap:18px;box-shadow:0 28px 90px #1720193d}.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.modal-head p{color:#6f7a72;margin-top:4px}.package-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.package-card{border:1px solid #dfd9cc;background:#fffdfa;border-radius:8px;padding:14px;display:grid;justify-items:start;gap:6px;min-height:132px;text-align:left}.package-card strong{font-size:22px}.package-card small{color:#657069}.package-card em{padding:3px 7px;color:#5a3700;background:#fff1cc;border-radius:999px}.package-card.selected{border-color:#1f7a63;box-shadow:0 0 0 3px #1f7a631f}.custom-amount-field{display:grid;gap:8px}.custom-amount-field>span{font-weight:760}.custom-amount-field div{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center}.custom-amount-field input{min-height:44px;border:1px solid #d9d5c9;border-radius:8px;background:#fffdfa;color:#172019;padding:0 12px;font:inherit;font-weight:720}.custom-amount-field small{color:#657069}.channel-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}.channel-row button{display:flex;justify-content:center;align-items:center;gap:8px;border:1px solid #d9d5c9;min-height:44px}.qr-box{display:grid;grid-template-columns:224px 1fr;gap:18px;align-items:center;padding:14px;border:1px solid #dfd9cc;border-radius:8px;background:#f8f5ed}.qr-box img{width:224px;height:224px;border-radius:6px;background:#fff}.qr-box div{display:grid;gap:12px;justify-items:start}@media(max-width:1120px){.workspace{grid-template-columns:320px 1fr}.right-pane{grid-column:1 / -1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-content:start}}@media(max-width:760px){.topbar{height:auto;min-height:70px;flex-wrap:wrap;padding:14px}.top-actions{width:100%;justify-content:space-between}.workspace{grid-template-columns:1fr;padding:12px}.canvas-pane{min-height:420px}.right-pane,.package-grid,.qr-box{grid-template-columns:1fr}.qr-box img{justify-self:center}}
