/* ── Design Canvas Editor ── */
.ce-shell { display: flex; flex-direction: column; height: 100vh; overflow: hidden; background: #2a2a2a; }
.ce-topbar { display: flex; align-items: center; gap: .75rem; padding: .5rem 1rem; background: #1a1a1a; color: #e8e0d6; flex-shrink: 0; border-bottom: 1px solid #3a3a3a; }
.ce-topbar-title { font-size: .95rem; font-weight: 600; color: #e8e0d6; flex: 1; }
.ce-main { display: flex; flex: 1; min-height: 0; }
.ce-left-panel { width: 56px; background: #1e1e1e; border-right: 1px solid #3a3a3a; display: flex; flex-direction: column; align-items: center; padding: .5rem 0; gap: .25rem; flex-shrink: 0; }
.ce-tool-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 6px; border: none; background: none; color: #999; cursor: pointer; font-size: 1.1rem; transition: background .15s, color .15s; }
.ce-tool-btn:hover, .ce-tool-btn.active { background: #333; color: #e8e0d6; }
.ce-tool-btn.img-btn { font-size: .75rem; text-align: center; line-height: 1.2; }
.ce-viewport { flex: 1; overflow: auto; display: flex; align-items: flex-start; justify-content: center; padding: 2rem; }
.ce-canvas { position: relative; background: #fff; box-shadow: 0 4px 32px rgba(0,0,0,.5); flex-shrink: 0; }
.ce-element { position: absolute; cursor: move; user-select: none; box-sizing: border-box; }
.ce-element.ce-selected { outline: 2px solid #4a8fff; outline-offset: 1px; }
.ce-element .ce-text-content { width: 100%; height: 100%; box-sizing: border-box; overflow: hidden; }
.ce-element .ce-img-content { width: 100%; height: 100%; object-fit: cover; display: block; }
.ce-resize-handle { position: absolute; width: 10px; height: 10px; background: #fff; border: 2px solid #4a8fff; border-radius: 50%; z-index: 10; box-sizing: border-box; }
.ce-resize-handle[data-dir="nw"] { top: -5px; left: -5px; cursor: nw-resize; }
.ce-resize-handle[data-dir="n"]  { top: -5px; left: calc(50% - 5px); cursor: n-resize; }
.ce-resize-handle[data-dir="ne"] { top: -5px; right: -5px; cursor: ne-resize; }
.ce-resize-handle[data-dir="e"]  { top: calc(50% - 5px); right: -5px; cursor: e-resize; }
.ce-resize-handle[data-dir="se"] { bottom: -5px; right: -5px; cursor: se-resize; }
.ce-resize-handle[data-dir="s"]  { bottom: -5px; left: calc(50% - 5px); cursor: s-resize; }
.ce-resize-handle[data-dir="sw"] { bottom: -5px; left: -5px; cursor: sw-resize; }
.ce-resize-handle[data-dir="w"]  { top: calc(50% - 5px); left: -5px; cursor: w-resize; }
.ce-sidebar { width: 280px; flex-shrink: 0; background: var(--surface, #fff); border-left: 1px solid var(--border, #e5e0d8); overflow-y: auto; color: var(--text1, #1a1a1a); }
.ce-sidebar-section { padding: .875rem 1rem; border-bottom: 1px solid var(--border, #e5e0d8); }
.ce-sidebar-section h4 { font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text2, #888); margin: 0 0 .6rem; }
.ce-field { margin-bottom: .65rem; }
.ce-field label { font-size: .8rem; color: var(--text2, #888); display: block; margin-bottom: .2rem; }
.ce-field input[type=text], .ce-field input[type=number], .ce-field textarea, .ce-field select { width: 100%; box-sizing: border-box; }
.ce-field input[type=color] { height: 32px; padding: 2px 4px; border-radius: 4px; border: 1px solid var(--border, #e5e0d8); width: 100%; box-sizing: border-box; }
.ce-field-row { display: flex; gap: .4rem; }
.ce-field-row .ce-field { flex: 1; }
.ce-field-row-4 { display: flex; gap: .3rem; }
.ce-field-row-4 .ce-field { flex: 1; }
.ce-canvas-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: #ccc; pointer-events: none; }
.ce-canvas-empty span { font-size: 2rem; margin-bottom: .5rem; }
.ce-z-row { display: flex; gap: .4rem; }
.ce-z-row button { flex: 1; padding: .3rem; font-size: .78rem; }
