.sph-character-editor-entry{display:flex;align-items:center;justify-content:center;gap:8px;margin:12px;min-height:40px;flex:none;font-size:14px}
#sphere-view #sph-left-elements [data-sph-character-edit]{grid-column:1/-1;min-height:36px;margin-top:8px}
.sph-character-editor{position:fixed;inset:0;z-index:2400;display:grid;place-items:center;padding:24px;background:#000a;color:#ededed;font-family:inherit;font-size:12px;line-height:1.5;letter-spacing:.3px;isolation:isolate}
.sph-character-editor *{box-sizing:border-box}
.sph-character-editor .sce-workspace{position:relative;display:flex;flex-direction:column;width:min(1240px,100%);height:min(800px,calc(100dvh - 48px));min-height:0;background:#1e1e1e;border:1px solid #ffffff0d;border-radius:10px;overflow:hidden;box-shadow:0 24px 80px #0007}
.sph-character-editor button,.sph-character-editor input,.sph-character-editor select{font:inherit;font-size:11px;line-height:16px;color:inherit;border:1px solid transparent;border-radius:6px;background:#272727;min-height:36px}
.sph-character-editor button{padding:7px 12px;cursor:pointer;white-space:nowrap}
.sph-character-editor button:hover{background:#383838}
.sph-character-editor button:disabled{opacity:.45;cursor:default}
.sph-character-editor :focus-visible{outline:2px solid #c4c4c4;outline-offset:2px}
.sph-character-editor input:focus,.sph-character-editor select:focus{outline:2px solid #b5b5b5;outline-offset:1px;border-color:#aaa}
.sph-character-editor .sce-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #ffffff0d;flex:none}
.sph-character-editor .sce-eyebrow{font-size:12px;color:#a7a7a7;letter-spacing:.12em}
.sph-character-editor h2{margin:0;font-size:12px;font-weight:600;line-height:18px}
.sph-character-editor h3{font-size:11px;line-height:16px;font-weight:500;margin:0 0 16px}
.sph-character-editor .sce-layout{display:grid;grid-template-columns:150px minmax(220px,1fr) 310px;min-height:0;flex:1;overflow:hidden}
.sph-character-editor .sce-nav{display:flex;flex-direction:column;gap:2px;padding:12px 8px;border-right:1px solid #ffffff0d;overflow:auto}
.sph-character-editor .sce-nav button{display:flex;align-items:center;gap:8px;text-align:left;background:transparent;border-color:transparent;min-height:36px;font-size:12px;line-height:16px;font-weight:500}
.sph-character-editor .sce-nav button[aria-pressed=true]{background:#484848;color:#fff}
.sph-character-editor .sce-nav button span{display:inline-grid;place-items:center;width:18px;font-size:16px;color:#bdbdbd}
.sph-character-editor .sce-stage{position:relative;min-height:260px;min-width:0;overflow:hidden;background:radial-gradient(ellipse at 50% 45%,#353535 0%,#242424 60%,#202020 100%)}
.sph-character-editor .sce-stage:after{content:"";pointer-events:none;position:absolute;width:58%;height:30px;left:21%;bottom:92px;border-radius:50%;background:#1115;filter:blur(9px)}
.sph-character-editor .sce-stage-title{position:absolute;z-index:1;top:16px;left:16px;right:16px;display:flex;flex-direction:column;gap:3px;pointer-events:none}
.sph-character-editor .sce-stage-title strong{font-size:12px;overflow-wrap:anywhere}
.sph-character-editor .sce-stage-title span{color:#aaa;font-size:12px;letter-spacing:.12em}
.sph-character-editor .sce-canvas{position:absolute;inset:70px 12px 90px;touch-action:none;cursor:grab;z-index:1}
.sph-character-editor .sce-canvas:active{cursor:grabbing}
.sph-character-editor .sce-canvas canvas{display:block;width:100%;height:100%}
.sph-character-editor .sce-stage-empty{position:absolute;inset:45% 20px auto;text-align:center;font-size:14px;color:#aaa}
.sph-character-editor [hidden]{display:none!important}
.sph-character-editor .sce-view-tools{position:absolute;bottom:43px;left:0;right:0;display:flex;gap:4px;justify-content:center;z-index:2;flex-wrap:wrap;padding:0 12px}
.sph-character-editor [data-frame][aria-pressed=true]{background:#484848;color:#ededed}
.sph-character-editor .sce-header [data-close]{width:32px;min-height:32px;padding:0;display:grid;place-items:center;background:transparent}
.sph-character-editor .sce-stage-hint{position:absolute;bottom:10px;left:0;right:0;text-align:center;color:#aaa;font-size:12px;margin:0}
.sph-character-editor .sce-controls{padding:16px;overflow-y:auto;min-height:0;border-left:1px solid #ffffff0d;scrollbar-width:thin;scrollbar-color:#666 transparent}
.sph-character-editor .sce-field{display:flex;flex-direction:column;gap:8px;margin-bottom:16px;font-size:11px;line-height:16px}
.sph-character-editor .sce-field>span{color:#c5c5c5}
.sph-character-editor .sce-field input:not([type=range]),.sph-character-editor .sce-field select{width:100%;padding:8px 10px}
.sph-character-editor .sce-field input[type=color]{height:44px;padding:4px}
.sph-character-editor .sce-field input[type=range]{width:100%;accent-color:#ddd;cursor:ew-resize;min-height:24px}
.sph-character-editor .sce-field output{font-size:12px;color:#bcbcbc;text-align:right;font-variant-numeric:tabular-nums}
.sph-character-editor .sce-note{font-size:12px;line-height:1.7;color:#a7a7a7;margin:16px 0}
.sph-character-editor .sce-check{display:flex;align-items:flex-start;gap:10px;font-size:12px;color:#bbb;margin-top:22px}
.sph-character-editor .sce-check input{min-height:0;accent-color:#ccc;margin-top:3px}
.sph-character-editor .sce-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 20px;border-top:1px solid #ffffff0d;flex:none}
.sph-character-editor .sce-footer p{margin:0;font-size:12px}
.sph-character-editor .sce-footer span{font-size:12px;color:#a7a7a7}
.sph-character-editor .sce-footer-actions{display:flex;gap:8px}
.sph-character-editor .sce-primary{background:#dedede;color:#202020;border-color:#dedede;font-weight:600}
.sph-character-editor .sce-primary:hover{background:#fff}
.sph-character-editor .sce-error{color:#edb5aa}
.sph-character-editor .sce-discard{position:absolute;inset:0;z-index:4;background:#0009;display:grid;place-items:center;padding:24px}
.sph-character-editor .sce-discard>div{max-width:420px;background:#272727;border:1px solid #555;border-radius:12px;padding:24px}
.sph-character-editor .sce-discard p{color:#bbb;margin-bottom:24px}
.sph-character-editor .sce-discard>div>div{display:flex;gap:8px;flex-wrap:wrap}
.sph-character-editor .sce-header h2,.sph-character-editor .sce-controls h3,.sph-character-editor .sce-discard h3{color:#ededed}
.sph-character-editor .sce-controls input[type=text],.sph-character-editor .sce-controls input[type=number],.sph-character-editor .sce-controls select{background:#272727;color:#ededed;border:1px solid transparent;box-shadow:none}
.sph-character-editor .sce-footer [data-status]{color:#ededed}
.sph-character-editor .sce-footer [data-status].sce-error{color:#edb5aa}
.sph-character-editor .sce-preview-options{position:absolute;top:44px;left:16px;right:16px;display:flex;justify-content:space-between;gap:8px;z-index:2;pointer-events:none}
.sph-character-editor .sce-preview-options>*{pointer-events:auto;background:#272727e8;font-size:11px;min-height:32px}
.sph-character-editor .sce-preview-options select{max-width:135px;padding:4px 8px}
.sph-character-editor [data-compare][aria-pressed=true]{background:#dedede;color:#202020}
.sph-character-editor .sce-body-presets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;padding:2px;background:#272727;border-radius:6px}
.sph-character-editor .sce-body-presets button{padding:7px 4px;background:transparent;min-height:32px}
.sph-character-editor .sce-body-presets button[aria-pressed=true]{background:#484848;border-color:transparent;color:#ededed}
.sph-character-editor .sce-edit-entry{padding-bottom:16px;margin-bottom:16px;border-bottom:1px solid #ffffff0d}
.sph-character-editor .sce-edit-entry .sce-field{margin-bottom:10px}
.sph-character-editor .sce-entry-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.sph-character-editor .sce-entry-actions .sce-swatch{width:24px;height:24px;min-height:24px;padding:0;border-radius:50%;background:var(--sce-swatch);border:1px solid #888}
.sph-character-editor .sce-entry-reset{font-size:11px;min-height:28px;padding:3px 9px;margin-left:auto}
.sph-character-editor .sce-filter{width:100%;padding:8px 10px;margin-bottom:20px}
@media(max-width:960px){.sph-character-editor{padding:12px}.sph-character-editor .sce-workspace{height:calc(100dvh - 24px)}.sph-character-editor .sce-layout{grid-template-columns:120px minmax(180px,1fr) 260px}.sph-character-editor .sce-controls{padding:18px}.sph-character-editor .sce-nav{padding:18px 6px}.sph-character-editor .sce-nav button{padding:7px 8px;gap:6px}}
@media(max-width:700px){.sph-character-editor{padding:6px}.sph-character-editor .sce-workspace{height:calc(100dvh - 12px);overflow:auto}.sph-character-editor .sce-header{padding:14px 16px}.sph-character-editor .sce-layout{display:grid;grid-template-columns:1fr;overflow:visible;flex:none}.sph-character-editor .sce-nav{flex-direction:row;overflow-x:auto;padding:10px;border-right:0;border-bottom:1px solid #383838}.sph-character-editor .sce-nav button{flex:1;justify-content:center}.sph-character-editor .sce-nav button span{display:none}.sph-character-editor .sce-stage{height:360px;min-height:360px}.sph-character-editor .sce-controls{overflow:visible;border-left:0;border-top:1px solid #383838}.sph-character-editor .sce-footer{padding:16px;align-items:stretch;flex-direction:column;gap:12px}.sph-character-editor .sce-footer-actions{justify-content:flex-end}.sph-character-editor .sce-discard{position:fixed}}
