.editor-page { padding-block: 24px 60px; }
.editor-heading { max-width: 860px; margin-bottom: 20px; }
.editor-heading h1 { margin: 12px 0 8px; font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.08; }
.editor-heading > p { color: var(--muted); font-size: 1.02rem; line-height: 1.7; }
.editor-privacy { display: inline-flex; gap: 8px; align-items: center; padding: 8px 13px; border: 1px solid rgba(85, 216, 193, .28); border-radius: 999px; color: var(--brand); background: rgba(85, 216, 193, .08); font-size: .82rem; font-weight: 800; }
.editor-privacy::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 16px var(--brand); }

/* --- Upload screen --- */
.editor-upload[hidden] { display: none; }
.editor-drop-zone { display: grid; place-items: center; gap: 14px; padding: 60px 24px; margin-top: 20px; border: 2px dashed var(--border); border-radius: 24px; background: rgba(10, 25, 42, .5); cursor: pointer; text-align: center; transition: border-color .18s ease, background .18s ease; }
.editor-drop-zone:hover, .editor-drop-zone.is-dragover { border-color: var(--brand); background: rgba(85, 216, 193, .06); }
.editor-drop-zone strong { font-size: 1.15rem; }
.editor-drop-zone span { color: var(--muted); }

/* --- Workspace --- */
.editor-workspace[hidden] { display: none; }
.editor-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 18px; background: rgba(10, 25, 42, .82); }
.editor-toolbar-spacer { flex: 1 1 auto; }
.editor-toolbar .button[disabled] { opacity: .45; cursor: not-allowed; }

.editor-workspace-grid { display: grid; align-items: start; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
.editor-sidebar, .editor-canvas-shell { border: 1px solid var(--border); border-radius: 22px; background: rgba(10, 25, 42, .82); box-shadow: var(--shadow); }
.editor-sidebar { position: sticky; top: 18px; max-height: calc(100vh - 40px); overflow-y: auto; padding: 18px; display: grid; gap: 18px; }

.editor-canvas-shell { min-width: 0; display: flex; justify-content: center; padding: 24px; background: rgba(0, 0, 0, .18); }
.editor-canvas-wrap { position: relative; max-width: 100%; }
#editor-preview-image { display: block; max-width: 100%; max-height: 70vh; border-radius: 10px; transition: filter .05s linear; }

.editor-crop-overlay[hidden] { display: none; }
.editor-watermark-preview[hidden] { display: none; }
.editor-watermark-preview {
    position: absolute; padding: 0; margin: 0; pointer-events: none;
    font-weight: 700; font-family: system-ui, sans-serif; white-space: nowrap;
    line-height: 1; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis;
}
.editor-watermark-preview[data-position="top-left"] { top: 12px; left: 12px; }
.editor-watermark-preview[data-position="top-right"] { top: 12px; right: 12px; }
.editor-watermark-preview[data-position="center"] { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.editor-watermark-preview[data-position="bottom-left"] { bottom: 12px; left: 12px; }
.editor-watermark-preview[data-position="bottom-right"] { bottom: 12px; right: 12px; }
.editor-crop-overlay { position: absolute; inset: 0; }
.editor-crop-mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); pointer-events: none; }
.editor-crop-box { position: absolute; border: 2px solid var(--brand); box-shadow: 0 0 0 9999px rgba(0, 0, 0, .5); cursor: move; touch-action: none; }
.editor-crop-handle { position: absolute; width: 14px; height: 14px; background: var(--brand); border: 2px solid #07111f; border-radius: 50%; touch-action: none; }
.editor-crop-handle[data-handle="nw"] { top: -8px; left: -8px; cursor: nwse-resize; }
.editor-crop-handle[data-handle="ne"] { top: -8px; right: -8px; cursor: nesw-resize; }
.editor-crop-handle[data-handle="sw"] { bottom: -8px; left: -8px; cursor: nesw-resize; }
.editor-crop-handle[data-handle="se"] { bottom: -8px; right: -8px; cursor: nwse-resize; }
.editor-crop-handle[data-handle="n"] { top: -8px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.editor-crop-handle[data-handle="s"] { bottom: -8px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.editor-crop-handle[data-handle="e"] { top: 50%; right: -8px; transform: translateY(-50%); cursor: ew-resize; }
.editor-crop-handle[data-handle="w"] { top: 50%; left: -8px; transform: translateY(-50%); cursor: ew-resize; }

.sidebar-section { display: grid; gap: 10px; }
.sidebar-section > strong { font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.editor-field-row { display: grid; gap: 6px; }
.editor-field-row label { font-size: .85rem; color: var(--muted); display: flex; justify-content: space-between; }
.editor-field-row input[type="range"] { width: 100%; }
.editor-field-row input[type="text"], .editor-field-row select {
    width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px;
    color: var(--text); background: #07111f; font: inherit;
}
.editor-color-row { display: flex; align-items: center; gap: 8px; }
.editor-color-row input[type="color"] { width: 36px; height: 36px; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: none; }
.editor-transform-row { display: flex; gap: 8px; flex-wrap: wrap; }

.editor-layer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.editor-layer-item { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255, 255, 255, .02); }
.editor-layer-item.is-selected { border-color: var(--brand); background: rgba(85, 216, 193, .08); }
.editor-layer-item .icon-button { width: 26px; height: 26px; padding: 0; display: grid; place-items: center; border-radius: 6px; font-size: .8rem; }
.editor-layer-label { flex: 1 1 auto; text-align: start; background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.editor-layer-editor[hidden] { display: none; }
.editor-layer-editor {
    position: fixed; inset-inline-end: 0; top: 0; bottom: 0; width: min(360px, 92vw);
    background: rgba(6, 16, 28, .98); border-inline-start: 1px solid var(--border);
    box-shadow: var(--shadow); padding: 20px; overflow-y: auto; z-index: 60; display: grid; gap: 14px; align-content: start;
}
.editor-layer-editor-header { display: flex; align-items: center; justify-content: space-between; }

@media (max-width: 900px) {
    .editor-workspace-grid { grid-template-columns: 1fr; }
    .editor-sidebar { position: static; max-height: none; order: 2; }
    .editor-canvas-shell { order: 1; }
}

/* END OF FILE */
