.editor-palette {
    width: 100%;
    max-width: 740px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 5px 10px;
    min-height: 55px;
    height: auto;
    flex-shrink: 0;
    box-sizing: border-box;
    flex-wrap: wrap;
    gap: 10px;
}

.palette-group { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; }
.palette-piece { width: 40px; height: 40px; cursor: grab; transition: transform 0.1s, background 0.2s, border-radius 0.2s; display: flex; justify-content: center; align-items: center; border-radius: 8px; touch-action: none; }
@media (hover: hover) { .palette-piece:hover { transform: scale(1.15); background: var(--border-light); border-radius: 12px; } }
.palette-piece:active, .square.has-piece:active { cursor: grabbing; }

.palette-piece.active-stamp { background: rgba(var(--primary-rgb), 0.3); border-radius: 8px; box-shadow: 0 0 0 2px var(--primary); transform: scale(1.1); }
.palette-piece.trash-btn svg { width: 26px; height: 26px; color: var(--danger); }
.palette-piece.trash-btn.active-stamp { background: rgba(var(--danger-rgb), 0.3); box-shadow: 0 0 0 2px var(--danger); }

.panel-title { margin: 0 0 20px 0; font-size: 1.2rem; color: var(--text-pure); text-align: center; text-transform: uppercase; letter-spacing: 2px; border-bottom: 1px solid var(--border-light); padding-bottom: 15px; font-weight: 800; flex-shrink: 0; }
.panel-separator { border: none; border-top: 1px solid var(--border-lighter); margin: 0; width: 100%; }

.editor-data-container { padding: 15px; height: 100%; overflow-y: auto; overflow-x: hidden; box-sizing: border-box; display: flex; flex-direction: column; gap: 30px; }
.editor-free-section { display: flex; flex-direction: column; gap: 10px; }
.editor-free-section.flex-grow { flex: 1; min-height: 0; overflow: visible; position: relative; z-index: 1; }
.editor-free-section .toggle-group { margin: 0; }

.editor-actions-container { padding: 15px; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; }
.editor-actions-group { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.editor-action-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; background: var(--bg-input); border: 1px solid var(--border-light); color: var(--text-main); font-weight: bold; font-size: 0.95rem; border-radius: 8px; cursor: pointer; transition: all 0.2s; margin-bottom: 0; box-sizing: border-box; }
@media (hover: hover) { .editor-action-btn:hover { background: var(--border-lighter); color: var(--text-pure); } }
.editor-action-btn svg { width: 20px; height: 20px; color: var(--primary); }
.editor-action-btn.disabled { opacity: 0.4; pointer-events: none; cursor: not-allowed; background: var(--bg-header-tabs); }
.editor-action-btn.danger-action svg { color: var(--danger); }