.reference-edit-button{width:100%;height:40px;margin-top:9px;border:1px solid #bba2f2;border-radius:9px;background:linear-gradient(105deg,#7855ee,#b64dd4);box-shadow:0 7px 17px rgba(117,77,210,.2);color:#fff;font-weight:800}.reference-edit-button span{margin-right:5px;font-size:16px}.reference-edit-button:hover{filter:brightness(1.04)}
.reference-editor{position:fixed;inset:0;z-index:260;display:none;align-items:center;justify-content:center;padding:18px}.reference-editor.open{display:flex}.reference-editor-backdrop{position:absolute;inset:0;background:rgba(15,18,28,.78);backdrop-filter:blur(8px)}.reference-editor-panel{position:relative;width:min(1500px,97vw);height:min(920px,95vh);display:flex;flex-direction:column;overflow:hidden;border:1px solid rgba(255,255,255,.18);border-radius:18px;background:#f8f9fc;box-shadow:0 30px 90px rgba(0,0,0,.48)}.reference-editor-panel>header{height:66px;flex:0 0 auto;padding:0 20px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #dfe4ed;background:#fff}.reference-editor-panel>header strong,.reference-editor-panel>header small{display:block}.reference-editor-panel>header strong{font-size:20px;color:#26344b}.reference-editor-panel>header small{margin-top:2px;color:#8491a5;font-size:11px}.reference-editor-panel>header button{width:36px;height:36px;border:0;border-radius:9px;background:#eef1f6;color:#536177;font-size:21px}.reference-editor-toolbar{min-height:54px;flex:0 0 auto;padding:9px 14px;display:flex;align-items:center;gap:7px;overflow-x:auto;border-bottom:1px solid #dfe4ed;background:#f7f8fb}.reference-editor-toolbar button{height:35px;padding:0 13px;flex:0 0 auto;border:1px solid #d9dfeb;border-radius:8px;background:#fff;color:#536178;font-weight:700}.reference-editor-toolbar button.active{border-color:#8d68e9;background:#7552e6;color:#fff;box-shadow:0 5px 13px rgba(113,78,216,.22)}.reference-editor-workspace{min-height:0;flex:1;padding:12px;display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:12px;background:#e9edf4}.reference-editor-stage{position:relative;min-width:0;min-height:0;display:grid;place-items:center;overflow:hidden;border:1px solid #394352;border-radius:13px;background-color:#2d333d;background-image:linear-gradient(45deg,#252b34 25%,transparent 25%,transparent 75%,#252b34 75%),linear-gradient(45deg,#252b34 25%,#343c48 25%,#343c48 75%,#252b34 75%);background-size:24px 24px;background-position:0 0,12px 12px}.reference-editor-stage .canvas-container{box-shadow:0 18px 46px rgba(0,0,0,.38)}.reference-editor-side{padding:15px;overflow:auto;border:1px solid #d9e0eb;border-radius:12px;background:#fff}.reference-editor-side>strong{font-size:15px;color:#2f3c52}.reference-editor-side>p{margin:8px 0 15px;color:#718096;font-size:12px}.reference-editor-side label span{display:block;margin-bottom:6px;color:#4b586d;font-size:12px;font-weight:800}.reference-editor-side textarea{width:100%;height:150px;padding:10px;resize:vertical;border:1px solid #ccd5e2;border-radius:8px;color:#334057;font:13px/1.55 inherit}.reference-editor-side textarea:focus{border-color:#8864e7;outline:3px solid rgba(119,81,224,.13)}.reference-editor-side textarea:disabled{background:#f1f3f7;color:#9aa4b2}.reference-editor-side>small{display:block;margin-top:10px;color:#8a96a8;font-size:11px}.reference-editor-panel>footer{height:64px;flex:0 0 auto;padding:0 18px;display:flex;align-items:center;gap:9px;border-top:1px solid #dfe4ed;background:#fff}.reference-editor-panel>footer span{margin-right:auto;color:#738197;font-size:12px}.reference-editor-panel>footer button{height:38px;padding:0 18px;border:1px solid #d6dde8;border-radius:8px;background:#fff;color:#56667d;font-weight:750}.reference-editor-panel>footer button.primary{border:0;background:linear-gradient(105deg,#7553ed,#bf4bd0);color:#fff;box-shadow:0 7px 15px rgba(117,78,211,.22)}
.reference-editor-color-label{flex:0 0 auto;margin-left:4px;color:#667085;font-size:12px;font-weight:800}.reference-editor-colors{height:35px;display:flex;align-items:center;gap:5px;padding:0 7px;border:1px solid #d9dfeb;border-radius:8px;background:#fff}.reference-editor-colors button{width:22px;height:22px;padding:0;border:2px solid #fff;border-radius:50%;box-shadow:0 0 0 1px #c9d1de}.reference-editor-colors button.active{border-color:#fff;box-shadow:0 0 0 2px #7954e7}.reference-editor-colors button[data-reference-color="#ff3b30"]{background:#ff3b30!important}.reference-editor-colors button[data-reference-color="#ffcc00"]{background:#ffcc00!important}.reference-editor-colors button[data-reference-color="#1677ff"]{background:#1677ff!important}.reference-editor-colors button[data-reference-color="#20b26b"]{background:#20b26b!important}.reference-editor-colors button[data-reference-color="#ffffff"]{background:#fff!important}.reference-editor-colors input[type=color]{width:25px;height:25px;padding:1px;border:1px solid #cbd3df;border-radius:6px;background:#fff;cursor:pointer}.reference-editor-crop-actions{position:absolute;z-index:8;left:50%;bottom:22px;display:flex;gap:8px;padding:7px;border:1px solid rgba(255,255,255,.6);border-radius:11px;background:rgba(25,31,41,.9);box-shadow:0 10px 28px rgba(0,0,0,.35);transform:translateX(-50%);backdrop-filter:blur(8px)}.reference-editor-crop-actions[hidden]{display:none}.reference-editor-crop-actions button{height:36px;padding:0 18px;border:1px solid #6d7787;border-radius:7px;background:#fff;color:#475467;font-weight:800}.reference-editor-crop-actions button.primary{border-color:#ffd645;background:#ffd645;color:#202735}.reference-editor-stage .upper-canvas{touch-action:none}.reference-editor-panel>footer button.guide{border-color:#8a65eb;background:#f5f1ff;color:#6842d7}
@media(max-width:800px){.reference-editor{padding:5px}.reference-editor-panel{width:100vw;height:100vh;border-radius:0}.reference-editor-workspace{grid-template-columns:1fr;grid-template-rows:minmax(320px,1fr) auto}.reference-editor-side{padding:10px}.reference-editor-side>p,.reference-editor-side>small{display:none}.reference-editor-side textarea{height:72px}.reference-editor-panel>footer span{display:none}.reference-editor-color-label{display:none}}
.reference-editor-workspace{grid-template-columns:minmax(0,1fr);gap:0}
.reference-edit-button:disabled{cursor:not-allowed;filter:grayscale(.25);opacity:.55;box-shadow:none}
.setting-options>.reference-edit-button,.id-photo-settings>.reference-edit-button{grid-column:1/-1;flex:0 0 auto}
.source-pixels{position:absolute;left:50%;bottom:10px;z-index:5;min-width:112px;padding:5px 11px;border:1px solid rgba(255,255,255,.28);border-radius:7px;transform:translateX(-50%);background:rgba(15,22,32,.78);box-shadow:0 5px 16px rgba(0,0,0,.25);color:#fff;font-size:12px;font-weight:800;line-height:1.2;text-align:center;white-space:nowrap;pointer-events:none;backdrop-filter:blur(6px)}
@media(max-width:800px){.reference-editor-workspace{grid-template-rows:minmax(320px,1fr)}}
