.pedit-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 46, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3100;
    padding: 20px;
}
.pedit-overlay.open { display: flex; }

.pedit-modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
}

.pedit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
}
.pedit-close { background: none; border: none; cursor: pointer; color: var(--text-secondary); display: flex; }

.pedit-body { padding: 18px; display: flex; flex-direction: column; gap: 12px; }

.pedit-preview {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.pedit-caption, .pedit-alt {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    background: var(--bg);
    color: var(--text-primary);
}
.pedit-caption { min-height: 80px; resize: vertical; }

.pedit-save {
    padding: 12px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--gradient);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.pedit-save:disabled { opacity: 0.6; cursor: default; }

.pedit-delete {
    padding: 12px;
    border: 1.5px solid #FF4757;
    border-radius: var(--radius-md);
    background: none;
    color: #FF4757;
    font-weight: 700;
    cursor: pointer;
}
.pedit-delete:disabled { opacity: 0.6; cursor: default; }

.pedit-delete-hint {
    margin: -4px 0 0;
    font-size: 0.78rem;
    color: var(--text-secondary);
}