:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#24364d;font-synthesis:none;--blue:#356edd;--muted:#63758c;--line:#dce5f0;--card:rgba(255,255,255,.82)}*{box-sizing:border-box}body{margin:0;background:#dceafb;font-size:14px;line-height:1.5;overflow:hidden}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}button,input,textarea,select,a{outline-offset:4px}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #447ce7}button{transition:background .15s,box-shadow .15s,transform .15s}button:hover:not(:disabled){filter:brightness(.98)}.ambient{position:fixed;pointer-events:none;z-index:-1;border-radius:45%;filter:blur(4px)}.ambient-one{width:1100px;height:700px;bottom:-570px;left:100px;border:65px solid #a0bff3;transform:rotate(-22deg);box-shadow:0 -30px 0 #c6dbfa,0 -60px 0 #afcdf9,0 -90px 0 #d3e4fb}.ambient-two{width:1200px;height:800px;right:-900px;top:-400px;background:linear-gradient(145deg,#b5d2f3,#e8f1fd);transform:rotate(-30deg)}.shell{display:flex;height:100vh;background:linear-gradient(125deg,#edf5faba,#f4f8feab);backdrop-filter:blur(35px)}.sidebar{width:232px;flex-shrink:0;background:linear-gradient(160deg,#eaf3fcad,#e5eef7d9);padding:28px 18px 15px;border-right:1px solid #ffffffd9;display:flex;flex-direction:column}.brand{display:flex;gap:11px;align-items:center;font-size:20px;font-weight:700;letter-spacing:-.6px;margin:0 7px 37px}.brand-icon{position:relative;background:linear-gradient(145deg,#80aef4,#386cd5);box-shadow:0 4px 10px #5379bb25,inset 0 1px 0 #ffffff77;color:white;border-radius:13px;width:39px;height:42px;display:grid;place-items:center;font-family:Georgia,serif;font-style:italic;font-size:28px}.brand-icon span{position:absolute;font-family:serif;font-size:15px;right:1px;top:-7px}.brand small{display:block;letter-spacing:1.7px;font-size:8px;color:#5f7188;margin-top:3px;font-weight:600}.nav-label,.project-heading{font-size:10px;font-weight:650;letter-spacing:1.1px;color:#5f7188}.nav-label{padding:0 13px;margin-bottom:10px}.nav-item{display:flex;align-items:center;gap:11px;padding:11px 12px;border:1px solid transparent;background:transparent;color:#546a83;width:100%;text-align:left;border-radius:9px;margin-bottom:5px;font-size:13px;min-height:43px}.nav-item.active{background:#ffffffba;border-color:#fff;color:#2d61c4;box-shadow:0 3px 10px #5578a010}.nav-item.active svg{color:#3c78e4}.nav-item svg{width:18px;height:18px}.nav-item .count{margin-left:auto;font-size:10px;background:#dfeaff;color:#3c65a4;border-radius:5px;padding:1px 6px}.project-heading{display:flex;align-items:center;justify-content:space-between;margin:28px 8px 7px}.project-heading .icon-button{width:27px;height:28px;font-size:21px}.projects-nav{overflow-y:auto;flex:1}.project-link{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;flex:1}.project-dot{width:8px;height:8px;border-radius:3px;background:#8ea9d8;flex-shrink:0}.sidebar-bottom{padding-top:14px}.connection-card{background:#f8fcffb8;border:1px solid #fff;border-radius:12px;padding:13px;margin-bottom:12px;cursor:pointer}.connection-title{display:flex;gap:8px;align-items:center;font-size:12px;font-weight:600}.dot{width:7px;height:7px;border-radius:50%;background:#a5b0bf;display:inline-block}.dot.on{background:#29a679;box-shadow:0 0 0 3px #29a67915}.connection-card small{font-size:10px;color:#5f7188;display:block;margin:5px 0 0 15px}.version{display:flex;justify-content:space-between;padding:12px 10px 0;border-top:1px solid #cfddea;font-size:9px;color:#5f7188}.workspace{flex:1;min-width:0;display:flex;flex-direction:column}.topbar{height:64px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #fff;padding:0 30px}.breadcrumbs{display:flex;align-items:center;gap:12px;color:#5f7188;font-size:12px}.breadcrumbs strong{color:#334d68;font-weight:500}.breadcrumbs svg{width:16px;height:16px}.topbar-right{display:flex;align-items:center;gap:16px}.local-pill{color:#5f7188;font-size:10px;display:flex;gap:7px;align-items:center}.icon-button{border:0;background:transparent;color:#5f7188;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:7px}.icon-button:hover{background:#e5eefb}.icon-button svg{width:18px;height:18px}main{padding:30px 34px 35px;flex:1;overflow-y:auto}.page-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:24px}h1{font-size:27px;letter-spacing:-.7px;line-height:1.2;margin:0 0 9px;font-weight:650}h2{font-size:16px;font-weight:600;letter-spacing:-.3px;margin:0}h3{font-size:13px;font-weight:600;margin:0}.subtitle{color:var(--muted);font-size:12px;margin:0;line-height:1.7}.eyebrow{color:#456b9b;letter-spacing:1.8px;font-size:9px;font-weight:700;margin-bottom:9px}.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 15px;min-height:40px;border:1px solid #d8e3ef;background:#ffffffba;border-radius:8px;color:#405d7d;font-size:12px;font-weight:550;white-space:nowrap}.button svg{width:16px;height:16px}.button.primary{background:linear-gradient(135deg,#3970cd,#2d5dbb);color:#fff;border-color:#4377da;box-shadow:0 4px 10px #3e70c422,inset 0 1px 0 #ffffff27}.button.danger{color:#b33743;border-color:#f0d2d8;background:#fff8f9}.button.small{padding:7px 11px;min-height:33px;font-size:11px}.actions{display:flex;gap:9px;align-items:center}.card{background:var(--card);border:1px solid #fff;border-radius:14px;box-shadow:0 5px 18px #46719b06}.card-head{display:flex;align-items:center;justify-content:space-between;padding:18px 20px 15px;border-bottom:1px solid #e9eff6}.step-label{display:flex;align-items:center;gap:10px}.step-number{background:#edf3ff;color:#4675be;width:25px;height:25px;display:grid;place-items:center;border-radius:7px;font-size:11px;font-weight:600}.counter{color:#5f7188;font-size:10px;background:#f1f5fa;padding:3px 7px;border-radius:5px}.references{display:grid;grid-template-columns:1fr 1.13fr 1fr;gap:15px}.reference-card{min-width:0}.reference-card .helper{min-height:45px;font-size:11px;color:#5f7188;padding:12px 18px 0;line-height:1.6}.dropzone{margin:13px 16px 16px;min-height:165px;border:1px dashed #bbcee8;border-radius:10px;background:linear-gradient(135deg,#f5f9ff,#eef5fe66);display:flex;align-items:center;justify-content:center;flex-direction:column;gap:9px;width:calc(100% - 32px);color:#526e91}.dropzone svg{width:30px;height:30px;stroke-width:1.3;color:#7d9dcb}.dropzone strong{font-size:11px;font-weight:550}.dropzone small{font-size:9px;color:#5f7188}.dropzone:hover{background:#edf4ff;border-color:#6991ce}.asset-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;padding:12px 16px}.asset{position:relative;aspect-ratio:3/4;border-radius:7px;overflow:hidden;background:#e7eef6}.asset img{width:100%;height:100%;object-fit:cover}.asset .remove{position:absolute;right:3px;top:3px;width:23px;height:23px;min-height:23px;border:0;border-radius:50%;background:#fff;color:#5c6b80;font-size:15px}.asset-name{position:absolute;bottom:0;left:0;right:0;background:#132d5299;color:white;font-size:8px;padding:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.add-more{margin:2px 16px 16px;width:calc(100% - 32px);min-height:34px}.workflow-note{display:flex;align-items:center;gap:9px;background:#e5effb77;border:1px solid #dbe7f5;color:#486c9a;border-radius:8px;padding:10px 14px;margin:15px 0 22px;font-size:10px}.workflow-note svg{width:15px;height:15px;flex-shrink:0}.options-grid{display:grid;grid-template-columns:1.6fr 1fr;gap:17px}.card-body{padding:18px 20px}.field{display:flex;flex-direction:column;gap:7px;margin-bottom:15px}.field:last-child{margin-bottom:0}.field label{font-size:11px;color:#566d88;font-weight:550}.field small{font-size:10px;color:#5f7188}input,textarea,select{border:1px solid #dbe4ef;border-radius:7px;background:#f8fbff;color:#344e6a;padding:10px 12px;min-width:0;width:100%;font-size:12px}textarea{resize:vertical;line-height:1.7;min-height:90px}select{height:39px}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:13px}.quality-line{display:flex;align-items:center;gap:9px;color:#59728f;font-size:11px;padding:7px 0}.quality-line svg{width:16px;height:16px;color:#599f8b}.quality-caption{margin-top:12px;border-top:1px solid #e6edf5;padding-top:13px;font-size:10px;color:#5f7188;line-height:1.7}.generate-bar{display:flex;align-items:center;justify-content:space-between;padding:17px 20px;background:#f7fbffc9;border:1px solid #fff;border-radius:12px;margin-top:18px}.generate-info{font-size:12px;font-weight:550}.generate-info small{display:block;font-size:10px;font-weight:400;color:#5f7188;margin-top:4px}.statusbar{height:30px;flex-shrink:0;border-top:1px solid #ffffffa1;display:flex;align-items:center;justify-content:space-between;padding:0 30px;font-size:9px;color:#5f7188}.statusbar>span:last-child{font-size:8px;letter-spacing:1.1px}.footer-star{color:#6b99d6;font-size:13px;margin-left:8px}.empty{padding:48px 25px;text-align:center}.empty-icon{width:65px;height:65px;background:linear-gradient(145deg,#e9f2ff,#dbe8ff);border:1px solid #fff;border-radius:19px;display:grid;place-items:center;color:#638bca;margin:0 auto 20px;box-shadow:0 9px 25px #4a7cbe11}.empty-icon svg{width:30px;height:30px;stroke-width:1.4}.empty h2{font-size:21px;margin-bottom:12px}.empty p{color:#5f7188;font-size:12px;line-height:1.8;max-width:430px;margin:0 auto 22px}.empty.hero{margin:12px 0 22px;padding:54px 30px;background:radial-gradient(ellipse at 50% 100%,#dae8ff88,transparent 65%),#ffffff99}.feature-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.feature{padding:22px}.feature svg{width:22px;height:22px;color:#7c9cca;margin-bottom:15px}.feature p{font-size:11px;line-height:1.8;color:#5f7188;margin:8px 0 0}.project-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:17px}.project-tile{padding:23px;cursor:pointer;text-align:left;color:inherit;min-height:160px}.project-tile .folder{color:#7fabea;margin-bottom:22px}.folder svg{width:35px;height:35px}.project-tile p{font-size:11px;color:#5f7188}.project-tile footer{display:flex;gap:12px;font-size:10px;color:#5f7188;margin-top:18px}.section-row{display:flex;align-items:center;justify-content:space-between;margin:27px 0 14px}.badge{display:inline-flex;align-items:center;gap:5px;border:1px solid #dae6f6;padding:4px 8px;border-radius:5px;color:#486c9a;background:#edf4fd;font-size:10px}.badge.completed{color:#267c60;background:#e5f5ed;border-color:#cfeadd}.badge.failed,.badge.cancelled{color:#a9525d;background:#fff0f2;border-color:#f1d9df}.results-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.result{overflow:hidden}.result-visual{height:245px;position:relative;background:linear-gradient(145deg,#e4edfa,#eff4fc);display:flex;align-items:center;justify-content:center;flex-direction:column;gap:12px;color:#8c9fb7}.result-visual img{height:100%;width:100%;object-fit:contain;cursor:zoom-in}.result-visual svg{width:32px;height:32px}.result-visual .badge{position:absolute;left:10px;top:10px}.result-body{padding:13px 15px}.result-body h3{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.result-body p{font-size:10px;color:#5f7188;margin:7px 0 10px;overflow-wrap:anywhere}.result-body .error{color:#a14c5b;max-height:70px;overflow:auto}.result-actions{display:flex;gap:6px}.result-actions button{flex:1}.spinner{width:25px;height:25px;border:2px solid #c8d9f2;border-top-color:#4c7ed2;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.connection-layout{max-width:860px;display:grid;grid-template-columns:1.5fr 1fr;gap:18px}.account-info{display:flex;gap:15px;align-items:center;margin-bottom:20px}.account-avatar{width:48px;height:48px;background:#e3edff;color:#4d7ac5;border-radius:14px;display:grid;place-items:center}.account-avatar svg{width:25px;height:25px}.account-info p{font-size:11px;color:#5f7188;margin:4px 0}.info-row{font-size:11px;padding:11px 0;display:flex;justify-content:space-between;gap:10px;border-bottom:1px solid #e8eef6;color:#5f7188}.info-row strong{color:#4c6584;font-weight:500;overflow-wrap:anywhere;text-align:right;max-width:70%}.notice{padding:14px;background:#f1f6ff;border:1px solid #dde9fb;border-radius:8px;font-size:11px;line-height:1.8;color:#5f7188;margin-top:18px}.notice.error{color:#a44956;background:#fff1f3;border-color:#efd9df}.settings-layout{max-width:930px}.settings-layout .card{margin-bottom:18px}.prompt-editor{font-family:ui-monospace,SFMono-Regular,monospace;font-size:11px;min-height:230px}.tabs{display:flex;gap:4px;border-bottom:1px solid #dee8f4;margin-bottom:20px}.tab{border:0;background:transparent;padding:12px 18px;color:#5f7188;border-bottom:2px solid transparent;font-size:12px}.tab.active{color:#3c6fc4;border-bottom-color:#5282d7}.help-step{display:flex;gap:13px;padding:14px 0}.help-step b{background:#e7f0ff;color:#6386bb;width:26px;height:26px;border-radius:7px;display:grid;place-items:center;flex-shrink:0}.help-step p{font-size:11px;color:#5f7188;margin:4px 0}.help-step h3{font-size:12px}.search{max-width:220px;background:#ffffff99}.page-tools{display:flex;gap:10px}.progress-strip{margin:16px 0;padding:13px 16px;border-radius:10px;background:#e6f0ff;border:1px solid #d0e2fa;display:flex;align-items:center;gap:12px;font-size:11px;color:#58769e}.progress-strip .spinner{width:18px;height:18px}.progress-strip .button{margin-left:auto}.progress-strip small{color:#5f7188}#toast{position:fixed;bottom:45px;left:50%;transform:translateX(-50%) translateY(20px);background:#2a4260;color:white;max-width:700px;padding:12px 19px;border-radius:9px;box-shadow:0 8px 35px #15335525;opacity:0;pointer-events:none;z-index:100;font-size:12px;transition:.2s}#toast.show{opacity:1;transform:translateX(-50%) translateY(0)}#toast.error{background:#923c4c}dialog{border:1px solid #fff;border-radius:17px;box-shadow:0 35px 100px #1b385d40;padding:0;max-width:780px;width:calc(100% - 80px);max-height:85vh;color:#2e4664;background:#f8fbff}dialog::backdrop{background:#304e744f;backdrop-filter:blur(7px)}.modal-head{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;border-bottom:1px solid #e1e9f3}.modal-body{padding:22px 24px;overflow:auto;max-height:69vh}.modal-foot{display:flex;justify-content:flex-end;gap:9px;padding:16px 24px;border-top:1px solid #e1e9f3}.analysis-section{margin-bottom:23px}.analysis-section h3{color:#547bad;margin-bottom:9px}.analysis-section pre{white-space:pre-wrap;font-family:inherit;font-size:12px;line-height:1.8;margin:0;background:#edf3fc;padding:15px;border-radius:8px;user-select:text}.lightbox{max-width:900px}.lightbox img{width:100%;max-height:67vh;object-fit:contain}.text-link{border:0;background:transparent;color:#4176cc;font-size:11px;padding:0}.spacer{height:14px}.fine-print{font-size:10px;line-height:1.7;color:#5f7188}.split-row{display:flex;align-items:center;justify-content:space-between}.name-input{font-size:24px;font-weight:600;background:transparent;border:0;padding:0;width:100%}.header-icon{display:flex;align-items:center;gap:10px}.header-icon svg{width:18px;height:18px;color:#7396c5}@media(max-width:1150px){.sidebar{width:200px;padding-left:12px;padding-right:12px}main{padding:25px 25px}.references{gap:10px}.card-head{padding:14px}.step-label{gap:6px}.step-label h3{font-size:12px}.dropzone{margin:12px;width:calc(100% - 24px);min-height:150px}.brand{font-size:18px}.results-grid{grid-template-columns:repeat(2,1fr)}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition:none!important}}

input::placeholder,textarea::placeholder{color:#65768c;opacity:1}.connection-card{outline-offset:3px}.empty.hero>.empty{padding:16px 25px}
dialog[open]{display:flex;flex-direction:column;overflow:hidden}.modal-head,.modal-foot{flex:0 0 auto}.modal-body{flex:1 1 auto;min-height:0;max-height:calc(85vh - 145px);overflow:auto}.modal-head .icon-button{flex-shrink:0}

.selection-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 14px;margin:-4px 0 14px;background:#f7fbffc9;border:1px solid #fff;border-radius:10px;font-size:11px;color:#5f7188}.selection-bar>span{margin-right:auto}.selection-bar strong{color:#2d61c4}.select-box{position:absolute;right:10px;top:10px;z-index:2;width:30px;height:30px;display:grid;place-items:center;background:#ffffffe6;border:1px solid #dce5f0;border-radius:8px;cursor:pointer;box-shadow:0 2px 8px #4a6c9a1a}.select-box input{width:17px;height:17px;margin:0;padding:0;accent-color:#356edd;cursor:pointer}.result.selected{outline:2px solid #356edd;outline-offset:-2px}

.gallery-selection{background:#f7fbff;border-color:#dce5f0}.gallery-selection .button{min-height:40px}.select-box{width:40px;height:40px}.select-box:focus-within{outline:3px solid var(--blue);outline-offset:2px}.select-box input{width:19px;height:19px}

/* ---- Web edition ---- */
a.button{text-decoration:none;cursor:pointer}
a.button:hover{filter:brightness(.98)}
.button[disabled]{opacity:.5;cursor:not-allowed}
.result-actions a,.result-actions button{flex:1}
.actions.wrap{flex-wrap:wrap}
.spinner.tiny{width:14px;height:14px;border-width:2px;flex-shrink:0}
.dropzone.dragging,.add-more.dragging{background:#e3eeff;border-color:#356edd;border-style:solid}
.dropzone:disabled{cursor:progress}
code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.95em;background:#e8f0fb;border-radius:4px;padding:1px 5px;overflow-wrap:anywhere}
#gate{position:fixed;inset:0;z-index:50;display:grid;place-items:center;padding:16px;background:radial-gradient(ellipse at 30% 10%,#f4f9ff,#dceafb 70%)}
#gate[hidden]{display:none}
.gate-card{width:100%;max-width:400px;padding:30px 30px 26px;background:#fbfdffeb}
.gate-card .brand{margin:0 0 26px}
.gate-card h1{font-size:23px}
.gate-card .subtitle{margin-bottom:20px}
.gate-card .button{width:100%}
.gate-error{color:#a44956;font-size:11px;min-height:18px;margin:0 0 8px}
.login-modal{max-width:640px}
.login-lead{font-size:12px;margin:0 0 6px;color:#4c6584}
.login-modal .help-step{padding:10px 0}
.login-modal .help-step p{line-height:1.7}
.login-modal a:not(.button){color:#2d61c4}
.callback-form{display:flex;gap:8px;margin-top:9px}
.callback-form input{flex:1;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px}
.login-status{display:flex;align-items:center;gap:10px;margin:14px 0 6px;padding:11px 13px;border-radius:8px;background:#eef4fe;border:1px solid #dbe7f8;color:#4c6584;font-size:11px}
.login-status svg{width:16px;height:16px;flex-shrink:0}
.login-status .button{margin-left:auto}
.login-status.error{background:#fff1f3;border-color:#efd9df;color:#a44956}
.login-status span{overflow-wrap:anywhere}
.device-code{display:flex;align-items:center;gap:12px;margin:9px 0 6px}
.device-code code{font-size:24px;letter-spacing:3px;font-weight:650;padding:8px 14px;background:#fff;border:1px solid #d8e3ef;color:#24364d;user-select:all}
@media(max-width:760px){
body{overflow:auto}
.shell{flex-direction:column;height:auto;min-height:100vh}
.sidebar{width:100%;padding:16px;border-right:0;border-bottom:1px solid #fff}
.brand{margin:0 0 14px}
#nav{display:flex;gap:6px;overflow-x:auto}
#nav .nav-item{width:auto;flex-shrink:0;margin:0}
.project-heading,.projects-nav,.nav-label{display:none}
.sidebar-bottom{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.sidebar-bottom .connection-card{margin:0;flex:1 1 200px}
.sidebar-bottom .nav-item{width:auto;margin:0}
.version{display:none}
.topbar{padding:0 16px;height:52px}
.breadcrumbs>svg:first-child,.breadcrumbs>span,.breadcrumbs>svg:nth-child(3){display:none}
main{padding:20px 16px;overflow:visible}
.page-title-row,.generate-bar{flex-direction:column;align-items:stretch}
.actions{flex-wrap:wrap}
.references,.options-grid,.feature-strip,.project-grid,.results-grid,.connection-layout,.form-row{grid-template-columns:1fr}
.statusbar{padding:0 16px}
.statusbar>span:last-child{display:none}
dialog{width:calc(100% - 24px)}
.callback-form{flex-direction:column}
}
