/* Zero Engine | Sprite Studio — desktop + mobile */
.se-modal-open{overflow:hidden!important}
.se-backdrop{position:fixed;inset:0;background:rgba(4,10,18,.85);z-index:15000;display:flex;align-items:center;justify-content:center;padding:12px;color:#dce7f3;font:12px 'Segoe UI',Arial,sans-serif}
.se-dialog{width:min(1500px,99vw);height:min(900px,96vh);min-height:470px;min-width:0;background:#2b2823;border:1px solid #8b8376;border-radius:10px;box-shadow:0 24px 100px #000c;display:flex;flex-direction:column;overflow:hidden}
.se-dialog *{box-sizing:border-box}.se-dialog button{white-space:normal;cursor:pointer;border:1px solid #716b60;background:#504a40;border-radius:5px;color:#fffcf6;padding:7px 9px;font:inherit;transition:background .15s}.se-dialog button:hover{background:#7d6446}.se-dialog button:disabled{opacity:.45;cursor:default}.se-dialog button.primary{background:#966831;border-color:#e0a258;color:#fff;font-weight:bold}.se-dialog button.danger{color:#ffabb0;border-color:#a44e55}.se-dialog button.unsaved{border-color:#ffa860;box-shadow:0 0 0 1px #ffa86080}.se-dialog input,.se-dialog select{width:100%;min-width:0;background:#0f1b28;border:1px solid #7b7468;color:#fff;padding:7px;border-radius:5px;font:inherit}.se-dialog input[type=checkbox]{width:16px;height:16px;accent-color:#e6a659}
.se-titlebar{min-height:45px;background:#111b29;padding:8px 13px;border-bottom:1px solid #65533d;display:flex;justify-content:space-between;align-items:center;gap:15px}.se-titlebar strong{font-size:15px;color:#fff}.se-titlebar #se-location{font-size:12px;color:#d4cec3;padding-left:15px}.se-title-actions{display:flex;gap:8px}.se-title-actions button{font-size:16px;padding:3px 10px}
.se-tools{display:flex;gap:5px;padding:7px;flex-wrap:wrap;align-items:center;background:#3e3a34;border-bottom:1px solid #5e584f;max-height:105px;overflow-y:auto}.se-tools button{padding:6px 8px!important;font-size:11px}.se-separator{height:22px;width:1px;background:#868076;margin:0 3px}
.se-body{display:grid;grid-template-columns:215px minmax(260px,1fr) 230px;flex:1;min-height:0}.se-left,.se-right{overflow:auto;background:#3b3731;padding:10px;min-width:0}.se-left{border-right:1px solid #6c665b}.se-right{border-left:1px solid #6c665b}.se-left h4,.se-right h4{font-size:12px;color:#fcf6eb;border-bottom:1px solid #6a6459;padding:5px 0 8px;display:flex;justify-content:space-between;align-items:center}.se-left h4 button{padding:2px 8px}.se-category{font-size:10px;text-transform:uppercase;letter-spacing:.7px;color:#c6c1ba;padding:12px 4px 4px}.se-left #se-anim-list{max-height:32%;overflow:auto}.se-left #se-anim-list button{width:100%;text-align:left;margin:2px 0;padding:7px}.se-left #se-anim-list button.active{background:#8f6635;border-color:#ffc785;color:#fff}.se-fields{display:flex;flex-direction:column;gap:9px;padding:10px 0}.se-fields>label,.se-minirow label{display:flex;flex-direction:column;gap:5px;color:#d1cec8;font-size:11px}.se-fields>label.se-check{flex-direction:row;align-items:center;font-size:12px}.se-minirow{display:flex;gap:6px}.se-minirow label{min-width:0;flex:1}.se-right small{font-size:11px;color:#bfb8ac;line-height:1.5}.se-gridbuttons{display:grid;grid-template-columns:1fr 1fr;gap:5px}
.se-workarea{display:flex;flex-direction:column;min-width:0;min-height:0;background:#23201c}.se-modebar{display:flex;flex-wrap:wrap;gap:5px;padding:8px;border-bottom:1px solid #605a50}.se-modebar button{font-size:11px;padding:6px 8px}.se-modebar button.sel{background:#875e2d;border-color:#ffbd6e}.se-stage{position:relative;flex:1;min-height:170px;overflow:auto;background-color:#433f37;background-image:linear-gradient(45deg,#34302a 25%,transparent 25%),linear-gradient(-45deg,#34302a 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#34302a 75%),linear-gradient(-45deg,transparent 75%,#34302a 75%);background-size:24px 24px;background-position:0 0,0 12px,12px -12px,-12px 0;display:block}.se-stage #se-canvaswrap{position:relative;margin:30px auto;box-shadow:0 0 0 1px #fffcf644,0 14px 60px #0008}.se-stage canvas{position:absolute;left:0;top:0;image-rendering:pixelated}.se-stage #se-overlay{touch-action:none;cursor:move}.se-status{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:7px;padding:8px;background:#35312a;border-top:1px solid #64523c;color:#d5d0c8}.se-status label{display:flex;align-items:center;gap:8px}.se-status input[type=range]{width:130px;accent-color:#feb863}
.se-framehead{padding:7px 10px;background:#423d35;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:7px;border-top:1px solid #787063}.se-framehead>div{display:flex;gap:5px;flex-wrap:wrap}.se-framehead button{font-size:11px}.se-strip{height:110px;display:flex;align-items:stretch;overflow:auto;gap:6px;padding:8px;background:#14202e;flex-shrink:0}.se-dialog .se-strip-frame{width:82px;min-width:82px;background:#484339;display:flex;flex-direction:column;align-items:center;padding:5px;border:1px solid #797369;gap:4px}.se-dialog .se-strip-frame.active{border:2px solid #ffc988;background:#6c4f2d}.se-strip-thumb{flex:1;width:67px;min-height:58px;background-position:center;background-size:contain;background-repeat:no-repeat;background-color:#18283a;border:1px dashed #898379;display:grid;place-items:center;font-size:29px;color:#bdb5a8}.se-strip-frame small{color:#eae6e0}.se-footer{padding:8px 12px;min-height:52px;border-top:1px solid #715c44;background:#38342c;display:flex;align-items:center;justify-content:space-between;gap:8px}.se-footer>span{max-width:48%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.se-footer>div{display:flex;gap:8px}.zero-empty-frame-icon{display:grid;place-items:center;width:100%;height:100%;font-size:22px;color:#f0c28b;background:#343029;border:1px dashed #958d7f}
@media(max-width:900px){.se-body{grid-template-columns:180px minmax(200px,1fr) 185px}.se-left,.se-right{padding:6px}.se-backdrop{padding:3px}.se-dialog{height:99vh;width:100vw}.se-tools{max-height:75px}.se-modebar{max-height:80px;overflow-y:auto}}
@media(max-width:660px){.se-body{display:flex;flex-direction:column;overflow:auto}.se-left,.se-right{width:100%;height:auto;max-height:200px;border:none;border-bottom:1px solid #7e776c}.se-left #se-anim-list{max-height:80px}.se-fields{display:grid;grid-template-columns:1fr 1fr}.se-fields h4{grid-column:1/-1}.se-workarea{min-height:330px;height:340px;flex-shrink:0}.se-stage{min-height:230px}.se-titlebar #se-location{display:none}.se-dialog{min-height:0;height:99vh}.se-footer{flex-wrap:wrap}.se-footer>span{max-width:100%;width:100%}.se-footer>div{width:100%;justify-content:flex-end}.se-tools{max-height:86px}}
/* O estúdio usa z-index 15000: confirmações nativas da Zero devem surgir ACIMA dele. */
body.se-modal-open #modal-confirm,body.se-modal-open #modal-prompt,body.se-modal-open #modal-alert{z-index:26000!important}

/* V23 — seleção rápida de cores e ferramentas */
.se-palette{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:4px;padding:5px 0}.se-palette button{height:19px;min-width:0;border:1px solid #757169;border-radius:3px;cursor:pointer;padding:0}.se-palette button:hover,.se-palette button:focus-visible{outline:2px solid #eff6ff;outline-offset:1px}.se-fields input[type=range]{width:100%}#se-brush{max-width:100px}

/* V28 - Paleta SEMPRE visível no topo do quadro, marcador de origem sem sombra */
.se-paintbar{background:#38342d;border-bottom:1px solid #705c43;flex:0 0 auto;padding:8px 11px;display:flex;flex-direction:column;gap:7px;min-width:0}
.se-paint-controls{display:flex;align-items:center;gap:15px;flex-wrap:wrap;min-width:0}
.se-paint-controls strong{color:#fbf6ed;font-size:12px;white-space:nowrap;margin-right:4px}
.se-dialog .se-paint-controls label{display:flex;flex-direction:row;align-items:center;gap:7px;font-size:11px;color:#f2efea;white-space:nowrap}
.se-dialog .se-paint-controls input[type=color]{width:38px!important;height:30px!important;min-width:38px;padding:2px;cursor:pointer;border-radius:5px;background:#0b1623}
.se-dialog .se-paint-controls input[type=range]{width:95px!important;min-width:50px;padding:0;accent-color:#ffcb8c;cursor:pointer}
.se-dialog .se-paint-controls input[type=number]{width:51px!important;min-width:51px;padding:5px 3px;text-align:center}
.se-paintbar .se-palette{display:flex;flex-wrap:wrap;gap:5px;width:100%;padding:1px 0;align-items:center}
.se-dialog .se-paintbar .se-palette button{width:22px;height:22px;min-width:22px;flex:0 0 22px;padding:0!important;cursor:pointer;border:1px solid #9c958a;border-radius:4px;transition:transform .12s,border-color .12s,box-shadow .12s;position:relative}
.se-dialog .se-paintbar .se-palette button:hover{transform:translateY(-2px) scale(1.08);z-index:2}
.se-dialog .se-paintbar .se-palette button.selected{border:2px solid #f9fafc;box-shadow:0 0 0 2px #ffb256;z-index:1}
.se-dialog .se-paint-controls output{min-width:24px;text-align:right;color:#fff7e8}
.se-stage #se-overlay{filter:none!important;box-shadow:none!important;opacity:1!important;mix-blend-mode:normal!important}
@media(max-width:900px){.se-paint-controls{gap:8px}.se-dialog .se-paintbar .se-palette button{width:19px;height:19px;min-width:19px;flex-basis:19px}}
@media(max-width:660px){.se-paintbar{padding:5px 7px;gap:5px}.se-paint-controls{gap:6px}.se-paint-controls strong{width:100%;font-size:11px}.se-dialog .se-paintbar .se-palette button{width:18px;height:18px;min-width:18px;flex-basis:18px}.se-workarea{min-height:445px;height:540px}}

/* Marcador de origem feito com CSS: nítido em qualquer zoom, sem sombras nem manchas */
#se-origin-marker{position:absolute;width:22px;height:22px;pointer-events:none;transform:translate(-50%,-50%);z-index:4;display:none;filter:none!important;box-shadow:none!important;background:linear-gradient(#fdfefe,#fdfefe) center/2px 22px no-repeat,linear-gradient(#fdfefe,#fdfefe) center/22px 2px no-repeat}
#se-origin-marker::before{content:"";position:absolute;inset:7px;border:2px solid #fdfefe;border-radius:50%;background:#2b2823;box-shadow:none!important}

/* V29 · ações do sprite acessíveis e confirmação personalizada */
.se-dialog .se-add-frame-hero{background:#744d25!important;border:1px solid #dba95b!important;color:#fff3d9!important;font-weight:750!important;box-shadow:inset 0 1px 0 #ffffff19;white-space:nowrap;}
.se-dialog .se-add-frame-hero:hover{background:#91642f!important;}
.se-dialog .se-strip-add{width:96px;min-width:96px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;background:#2d3429;border:2px dashed #c48a45;color:#f7dfbb;border-radius:6px;cursor:pointer}
.se-dialog .se-strip-add span{font-size:33px;font-weight:600;line-height:1}.se-dialog .se-strip-add small{color:#ffdfab;line-height:1.35;font-weight:650;text-align:center}
.se-dialog .se-strip-add:hover{background:#4a3c29;border-color:#ffcb77}
.se-confirm-shade{position:fixed;inset:0;z-index:30001;display:grid;place-items:center;background:rgba(0,0,0,.78);padding:16px}
.se-confirm-card{width:min(510px,100%);padding:23px;background:#282b2a;border:1px solid #aa8350;border-radius:12px;box-shadow:0 25px 75px #000c;color:#f7efe2;font:13px/1.5 'Segoe UI',sans-serif}
.se-confirm-card h3{font-size:17px;margin:0 0 10px;color:#f8d19a}.se-confirm-card p{color:#d2cbc1;margin:0 0 22px}
.se-confirm-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
.se-dialog .se-confirm-actions button{border-radius:6px;padding:10px 13px;background:#383d38;border:1px solid #66635d;color:#eee;font-size:12px;font-weight:600}
.se-dialog .se-confirm-actions button.primary{background:#ad7736;border-color:#deab66;color:#fff}
.se-dialog .se-confirm-actions button.se-danger-outline{border-color:#a16460;color:#ffcbbe}
.se-dialog button.primary{background:#a16c2e;border-color:#ddaa63}.se-dialog button.primary:hover{background:#bb8644}
@media(max-width:660px){.se-confirm-actions button{flex:1 1 100%}.se-dialog .se-add-frame-hero{white-space:normal}}
/* Final V29: quadros e campos em grafite quente, sem tonalidade azul na interface */
.se-strip{background:#24231f;border-top:1px solid #5d5141}
.se-dialog .se-strip-frame{background:#34312b;border-color:#6f6454}
.se-dialog .se-strip-frame.active{background:#594229;border-color:#e1ae6c}
.se-strip-thumb{background-color:#25231f;border-color:#80705a;color:#e5c594}
.se-dialog input,.se-dialog select{background:#171915;border-color:#675c4d}
.se-dialog .se-strip-add{background:#302b22}
.se-status input[type=range],.se-dialog input[type=checkbox]{accent-color:#d7a15c}

/* V29 · dimensões reais dos frames */
.se-size-section{display:flex;flex-direction:column;gap:9px;background:#322b21;border:1px solid #8b6a3e;border-radius:7px;padding:9px;margin:0 0 8px;box-sizing:border-box}
.se-size-section h4{margin:0!important;color:#f5c78a!important;border-color:#765d38!important}
.se-size-section>.se-check{display:flex;gap:8px;align-items:center;color:#e8d5b7;font-size:11px}
.se-size-section input[type=checkbox]{width:15px;height:15px;accent-color:#cf9c55}
.se-size-section label{display:flex;flex-direction:column;gap:4px;font-size:11px;color:#e6d6c0}
.se-size-section .se-minirow{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.se-size-section select{width:100%}
.se-size-section small{font-size:10px;color:#c6b79f;line-height:1.45}
.se-size-section button{padding:8px}
